Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- # Сюда скопируй айди с tiktokapi.ga
- TIKTOK_ID = '221387042293723136'
- url = 'https://tiktokapi.ga/php/jsonpst.php?uid={}&cursor={}'
- links = []
- cursor = 0
- print('ples wait')
- while cursor is not None:
- result = requests.get(url.format(TIKTOK_ID, cursor)).json()
- for item in result.get('aweme_list', []):
- links.append(item['video']['play_addr']['url_list'][-1])
- cursor = result.get('max_cursor')
- open('links.txt', 'w').write('\n'.join(links))
- print('\n'.join(links))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement