def store_redirect(self, url): """ Update history when redirect happens """ cause_ev = self.log._prev_entry(url, last_idx=-1) if cause_ev: self.history.append(cleaned_har_entry(cause_ev.data))