Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import requests
  2.  
  3. # Сюда скопируй айди с tiktokapi.ga
  4. TIKTOK_ID = '221387042293723136'
  5.  
  6.  
  7.  
  8. url = 'https://tiktokapi.ga/php/jsonpst.php?uid={}&cursor={}'
  9. links = []
  10. cursor = 0
  11.  
  12. print('ples wait')
  13. while cursor is not None:
  14. result = requests.get(url.format(TIKTOK_ID, cursor)).json()
  15. for item in result.get('aweme_list', []):
  16. links.append(item['video']['play_addr']['url_list'][-1])
  17. cursor = result.get('max_cursor')
  18.  
  19. open('links.txt', 'w').write('\n'.join(links))
  20. print('\n'.join(links))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement