From 2b07779f5c059e01d25868314704791fc316daa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Mon, 26 Feb 2018 16:37:32 +0100 Subject: [PATCH 1/2] Bug fix --- profiles/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/models.py b/profiles/models.py index 25144e0..63b315e 100644 --- a/profiles/models.py +++ b/profiles/models.py @@ -97,7 +97,7 @@ class Website(models.Model): url = random.choice(self.notable_pages.all()).url elif rand <= 0.8: search_term_text = self.name + " " + \ - random.choice(self.keywords.all()) + str(random.choice(self.keywords.all())) url = user.search_engine.search_url(search_term_text) else: url = user.search_engine.search_url(self.name) From 15e0c2a11c01289fca5fddd5ff894d3917242048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Mon, 26 Feb 2018 16:37:51 +0100 Subject: [PATCH 2/2] Partial runner fix --- histories/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/histories/models.py b/histories/models.py index 45e6a7d..d970c20 100644 --- a/histories/models.py +++ b/histories/models.py @@ -107,12 +107,12 @@ class History(models.Model): output += str(entry) + '\n' return output - def play_histories(self): + async def play_histories(self): """ Actually plays the history. """ self.played = True - runner = TorInstance(self.return_history()) - runnner.run() + runner = await TorInstance.create(self.return_history(), self.user.browser_fingerprint.serialize_headers()) + runner.run() self.save() def to_xml(self, xml_root=None):