davidteather / TikTok-Api

The Unofficial TikTok API Wrapper In Python
https://davidteather.github.io/TikTok-Api
MIT License
4.86k stars 974 forks source link

[BUG] - Seems like Pagination is broken? #1105

Open jasonwonton opened 9 months ago

jasonwonton commented 9 months ago

Running into problems paginating using search.py. Pagination on hashtag.py works fine. Also working with headless=False and using msToken.

After cursor finds "has_more" on the first page (which works fine) and tries to paginate, I run into this response.

{'type': 1, 'user_list': [], 'challenge_list': None, 'music_list': None, 'cursor': 20, 'has_more': 0, 'status_code': 0, 'qc': '', 'rid': '------------', 'log_pb': {'impr_id': '-------'}, 'extra': {'now': 1705291138000, 'logid': '--------------', 'fatal_item_ids': [], 'search_request_id': ''}, 'search_nil_info': {'search_nil_type': '', 'is_load_more': 'is_load_more', 'search_nil_item': 'empty_session', 'text_type': 10}, 'input_keyword': 'david teather', 'global_doodle_config': {'keyword': 'david teather', 'display_filter_bar': 0, 'new_source': '', 'search_channel': 'tiktok_user', 'hide_results': False, 'feedback_survey': None, 'hit_shark': False, 'hit_dolphin': False}, 'feedback_type': 'user'}

So this is telling me, after the first page of results and changing cursor, we get has_more = 0 which forces us to exit. Anyone have any recommendations?

jasonwonton commented 9 months ago

Just found this bug - https://github.com/davidteather/TikTok-Api/issues/1088