Fix crash on URLs with no 'rel' attribute (Fixes #79)
This commit is contained in:
pare
87ee1df1c0
commit
1c93e350f7
S'han modificat 1 arxius amb 3 adicions i 0 eliminacions
|
@ -960,6 +960,9 @@ class Mastodon:
|
|||
if isinstance(response, list) and 'Link' in response_object.headers and response_object.headers['Link'] != "":
|
||||
tmp_urls = requests.utils.parse_header_links(response_object.headers['Link'].rstrip('>').replace('>,<', ',<'))
|
||||
for url in tmp_urls:
|
||||
if not 'rel' in url:
|
||||
continue
|
||||
|
||||
if url['rel'] == 'next':
|
||||
# Be paranoid and extract max_id specifically
|
||||
next_url = url['url']
|
||||
|
|
Loading…
Referencia en una nova incidència