Mikubill / pixivpy-async

Pure Python 3 Async Pixiv API
The Unlicense
148 stars 18 forks source link

Json server response. Error: Offset must be no more than 5000 #9

Closed ghost closed 4 years ago

ghost commented 4 years ago

I'm trying to get 11.000 followings from my pixiv account but at a middle way got this error in json request: {'error': {'user_message': '', 'message': '{"offset":["Offset must be no more than 5000"]}', 'reason': '', 'user_message_details': {}}} Is there any way to get over 5000 followings from my account? How I do that:

    next_qs = 31545655
    while next_qs:
        if type(next_qs) is not int:
            user_following_json = await app_api.user_following(**next_qs)
        else:
            user_following_json = await app_api.user_following(next_qs)
        next_qs = app_api.parse_qs(user_following_json.next_url)
Mikubill commented 4 years ago

dup https://github.com/upbit/pixivpy/issues/113 https://github.com/upbit/pixivpy/issues/71 The max offset limit of the api may have been reached, there is currently no way to bypass it

ghost commented 4 years ago

Oh okay. Thank you for your fast answer)

am-steph commented 2 years ago

I found a workaround solution for getting pass the 5000 limit for search_illust where you would get the create_date of the last item then set that as the end_date parameter in a new search_illust with the offset back to 0. A dictionary can be used to resolve any duplicates.

I'm not sure if this is also possible to find out date information when querying for following?