Russell-Newton / TikTokPy

Extract data from TikTok without needing any login information or API keys.
https://pypi.org/project/tiktokapipy/
MIT License
192 stars 24 forks source link

[FEATURE REQUEST] Is it possible to add the feature to get videos by limit page, here tiktok uses cursor next #68

Closed truongbo17 closed 11 months ago

truongbo17 commented 11 months ago

is it possible to add the feature to get videos by limit page, here tiktok uses cursor next

Russell-Newton commented 11 months ago

I'm unfamiliar with limit pages. Can you give an example API call or an example of where it comes up in regular use of TikTok?

truongbo17 commented 11 months ago

`

$query = [ "count" => 30, "id" => $user_id, "cursor" => $cursor, "type" => 1, "secUid" => $author_sec_id, "sourceType" => 8, "appId" => 1233 ];

`

it is query

Russell-Newton commented 11 months ago

What's the endpoint? If I were to browse TikTok normally on desktop or mobile, where would this get called?

truongbo17 commented 11 months ago

The above query is of this api: https://github.com/Russell-Newton/TikTokPy/blob/main/src/tiktokapipy/util/queries.py#L19

response will be data and includes the cursor representing the next data when you pass the new pointer on

truongbo17 commented 11 months ago

i used to go through these api and when it added limit , page . It will be much more useful if you randomize any number for cursor

check here: https://github.com/truongbo17/service-api/blob/main/app/app/Api/Nature/Tiktok/TiktokApi.php#L344