Handle pagination with parse_qs()
masterWhen an API response includes a next_url, you can use the parse_qs method to extract the query string parameters required to fetch the next page of results. These parameters can then be passed into the original method using dictionary unpacking (**).
from pixivpy3 import AppPixivAPI
api = AppPixivAPI()
# 1. Get initial results
json_result = api.illust_related(57065990)
# 2. Extract pagination parameters from the next_url
next_qs = api.parse_qs(json_result.next_url)
# 3. Fetch the next page using the extracted parameters
json_result = api.illust_related(**next_qs)
illust = json_result.illusts[0]
print(f">>> {illust.title}, origin url: {illust.image_urls.large}")