WebbCompare
WebbCompare copied to clipboard
Not able to scrape
Hello I think this is not working well, its not able to scrape by Author/Hashtag I dont know how to code but i will donate to thank the creator of this fantastic open source bot
Hi, Yes I am currently in the process of updating the code to support the latest version of the TikTokAPI. Some things are broken for the latest version of TikTokAPI 3.6.2, I will be fixing it shortly, but in the meantime if you want it to work install TikTokAPI 3.5.8
I cant get it to work, installed 3.5.8 version but its not woirking for me. I guess i will wait for update, thank you
well, you dont have to wait for the Update by @HA6Bots the error is very straight forward and its very easy to fix in 3 or 4 lines of code ... you just have to read the code,
The new tiktokapi requires us a user agent and a cookie with the same identity, so each time request something it has to have the same cookie, so the problem its mainly on the way we request the data
@HA6Bots implemented a request type using python requests with these headers [('User-agent', 'okhttp'), ('referer', 'https://www.tiktok.com/')]
You just have to edit the headers on the request to fit the random generated cookie which is in this case the DID interpolated variable and the user agent
headers={
"Accept": "*/*",
"Accept-Encoding": "identity;q=1, *;q=0",
"Accept-Language": "en-US;en;q=0.9",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"cookie": "tt_webid_v2=" + b.did,
"Host": url.split("/")[2],
"Pragma": "no-cache",
"Range": "bytes=0-",
"Referer": "https://www.tiktok.com/",
"User-Agent": b.userAgent,
},
or just use get_bytes or get_video_by_url as the api tells you... its up to you
On what file? tiktok.py?
the variable "b.did" whats its value?
@Arukaito Thank you. Yes sorry guys - been extremely busy lately, I should be able to get it updated by the end of this week.
API Fix! Please try again now with new server code.