From a46f4cfdff542200e2a08443bdc8947885fb2928 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 21 Mar 2013 11:44:13 +0100 Subject: [PATCH] fallback on mobile website if there is no CCPTE input field on homepage --- modules/cragr/web/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cragr/web/pages.py b/modules/cragr/web/pages.py index 3bab5c8c..4e824feb 100644 --- a/modules/cragr/web/pages.py +++ b/modules/cragr/web/pages.py @@ -32,7 +32,7 @@ class HomePage(BasePage): def get_post_url(self): for script in self.document.xpath('//script'): text = script.text - if text is None: + if text is None or not 'CCPTE' in text: continue m = re.search(r'var chemin = "([^"]+)"', text, re.MULTILINE)