Skip to content

Commit

Permalink
Update r.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielsroka authored Jan 21, 2022
1 parent da02100 commit 947cf6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion r.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def r(method, url, json=None):

def get(url):
res = r('GET', url)
links = [link for link in res.headers.get_all('link') or [] if 'rel="next"' in link]
links = [link for link in res.headers.get_all('link', []) if 'rel="next"' in link]
res.next_url = re.search('<(.*)>', links[0]).group(1) if links else None
return res

Expand Down

0 comments on commit 947cf6f

Please sign in to comment.