Skip to content

Converts integers to and from their equivalent YouTube Data API v3 pageToken.

License

Notifications You must be signed in to change notification settings

dtuit/PageTokenGenerator-YouTubeAPIv3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page Token Generator YouTubeAPIv3

Converts integers into and from their equivelent YouTube Data API v3 pageToken.

Verified to generate tokens for items 0 to over 1,000,000 using the following request, theoretically should work upto 4,194,304

Usage

# Convert number to Token
print(PageTokenGenerator.number_to_token(50))

# Convert token to number
print(PageTokenGenerator.token_to_number('CDIQAA'))

# Convert prevToken to number
print(PageTokenGenerator.token_to_number('CDIQAQ'))

# Gets the first ten pageTokens for 50 items each.
for i in range(0, 10):
    print(PageTokenGenerator.number_to_token(i * 50))

Note

  • Search endpoint only allows a maximum 500 results
  • cant use with comments, commentThreads endpoints as a different pageToken system is used

About

Converts integers to and from their equivalent YouTube Data API v3 pageToken.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages