[twitter] fix bug when twitter lies to us saying there are more results and returns an empty page
This commit is contained in:
parent
3010ae7a70
commit
b163888988
1 changed files with 5 additions and 2 deletions
|
|
@ -52,8 +52,11 @@ class TwitterJsonHTMLPage(JsonPage):
|
|||
self.scroll_cursor = self.doc['scroll_cursor']
|
||||
|
||||
self.has_next = self.doc['has_more_items']
|
||||
el = html.parse(StringIO(self.doc['items_html']), parser)
|
||||
self.doc = el if el.getroot() is not None else html.Element('brinbrin')
|
||||
if self.doc['items_html']:
|
||||
el = html.parse(StringIO(self.doc['items_html']), parser)
|
||||
self.doc = el if el.getroot() is not None else html.Element('brinbrin')
|
||||
else:
|
||||
self.doc = html.Element('brinbrin')
|
||||
|
||||
|
||||
class LoginPage(HTMLPage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue