mirror of https://gitlab.com/bashrc2/epicyon
Avoid infinite loop when there are no feed items
parent
cc0d3d34fa
commit
d0c1546037
12
posts.py
12
posts.py
|
@ -164,11 +164,13 @@ def parseUserFeed(session, feedUrl: str, asHeader: {},
|
|||
|
||||
if nextUrl:
|
||||
if isinstance(nextUrl, str):
|
||||
userFeed = parseUserFeed(session, nextUrl, asHeader,
|
||||
projectVersion, httpPrefix,
|
||||
domain)
|
||||
for item in userFeed:
|
||||
yield item
|
||||
if '?max_id=0' not in nextUrl:
|
||||
userFeed = \
|
||||
parseUserFeed(session, nextUrl, asHeader,
|
||||
projectVersion, httpPrefix,
|
||||
domain)
|
||||
for item in userFeed:
|
||||
yield item
|
||||
elif isinstance(nextUrl, dict):
|
||||
userFeed = nextUrl
|
||||
if userFeed.get('orderedItems'):
|
||||
|
|
Loading…
Reference in New Issue