diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 6513c33..d5c6225 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -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']