[twitter] fix bug when twitter lies to us saying there are more results and returns an empty page

This commit is contained in:
Bezleputh 2014-06-11 15:18:21 +02:00
commit 6e051c4b54

View file

@ -52,7 +52,8 @@ class TwitterJsonHTMLPage(JsonPage):
self.scroll_cursor = self.doc['scroll_cursor']
self.has_next = self.doc['has_more_items']
self.doc = html.parse(StringIO(self.doc['items_html']), parser)
el = html.parse(StringIO(self.doc['items_html']), parser)
self.doc = el if el.getroot() is not None else html.Element('brinbrin')
class LoginPage(HTMLPage):