diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 3b186fe..8aa741a 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -957,7 +957,7 @@ class Mastodon: raise MastodonAPIError("Could not parse response as JSON, response code was %s, bad json content was '%s'" % (response_object.status_code, response_object.content)) # Parse link headers - if isinstance(response, list) and 'Link' in response_object.headers: + 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 url['rel'] == 'next':