Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Pagination of list_hashtag method #12

Open
racinmat opened this issue Feb 25, 2019 · 5 comments
Open

Pagination of list_hashtag method #12

racinmat opened this issue Feb 25, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@racinmat
Copy link

Hi, is there any possibility to paginate in list_hashtag method?
I see there is the count and offset query parameter, but the offset parameter seems to be doing nothing no matter which value it has. Is there any possibility to obtain some number of videos but skipping the first X? So I wouldn't have one query with high count, but multiple smaller queries using the pagination.

@tolgatasci
Copy link
Owner

soon I'll add the paging feature to all of them. It's a simple thing but I forgot to add.

@racinmat
Copy link
Author

Could you elaborate a bit on how the pagination should work and thich parameters should be used for that, so I could implement it myself?

@tolgatasci
Copy link
Owner

tolgatasci commented Feb 25, 2019

as a step below and I used the token. Where is all the same for a friend list paging

https://api2-19-h2.musical.ly/aweme/v1/user/follower/list/?user_id=6594722549190574086&max_time=0&count=20&offset=0&source_type=1&retry_type=no_retry HTTP/2.0

object		{11}
	log_pb		{1}
		
	extra		{3}
		
has_more	:		true // if false finished
		
status_code	:	0
		
	followers		[20]
	
		
rec_has_more	:		false
		
max_time	:	1551117517 // pagition max_time next page
		
offset	:	0
		
min_time	:	1551056413 // pagition min_time prev page
		
total	:	50332   // total result count
		
myself_user_id	:	6594722549190574086


two request two page



https://api2-19-h2.musical.ly/aweme/v1/user/follower/list/?user_id=6594722549190574086&max_time=*********1551117517( look top max_time mirror )************&count=20&offset=0&source_type=1&retry_type=no_retry


object		{11}
		
	log_pb		{1}
		
	extra		{3}
		
has_more	:		true
		
status_code	:	0
		
	followers		[20]
		
rec_has_more	:		false
		
max_time	:	1551117137
		
offset	:	0
		
min_time	:	1551056409
		
total	:	50332
		
myself_user_id	:	6594722549190574086



@tolgatasci tolgatasci added the enhancement New feature or request label Feb 25, 2019
@racinmat
Copy link
Author

Thanks for answer. I see, for followers list it is quite simple when the response provides me both min and max time.
Unfortunately, for the list_hashtag the min_time and max_time is not provided.
But I found out that while you can not perform this time-wise pagination, you can do the cursor pagination by passing the cursor parameter, so I am able to skip first X videos by adding &cursor=X to query.

@tolgatasci
Copy link
Owner

tolgatasci commented Feb 26, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants