diff --git a/pyGTrends.py b/pyGTrends.py index 630a16a..0ed5b04 100644 --- a/pyGTrends.py +++ b/pyGTrends.py @@ -51,6 +51,8 @@ def _connect(self): galx = re.compile('') resp = self.opener.open(self.url_ServiceLoginBoxAuth).read() + resp = re.sub(r'\s\s+', ' ', resp) + m = galx.search(resp) if not m: raise Exception("Cannot parse GALX out of login page")