drawrowfly / tiktok-scraper

TikTok Scraper. Download video posts, collect user/trend/hashtag/music feed metadata, sign URL and etc.
4.4k stars 799 forks source link

[Tutorial] How to download from private users! #411

Open MrMoHanD opened 3 years ago

MrMoHanD commented 3 years ago

for this tutorial I'm on ubuntu 14.04 and installed tiktok-scraper module via npm

Get your sessionid cookie value

login to tiktok via any browser (e.g.: chrome) and get your sessionid cookie value sessionid

Edit the entry.js file

edit the following file /usr/lib/node_modules/tiktok-scraper/build/entry.js by adding seesionid=xxxxxxxxxxxxxxxx; to line 36 ttscookie

save it and you are ready to go!! you can use available command !

o7n commented 3 years ago

So that's great! Would it be possible to add the sessionID as an optional command line parameter?

drawrowfly commented 3 years ago

@o7n you probably didn't checked the documentation

Please read it :)

drawrowfly commented 3 years ago

There is already option that can be used to set session

o7n commented 3 years ago

Oops, my apologies! Last time I read the documentation was two months ago...

paulescobar commented 3 years ago

Hey man, I've been using this tutorial...but in the latest version (1.4.27), the cookie line no longer exists in "entry.js". Should we just add it manually the way it looks in your screenshot? Or has the method changed?

drawrowfly commented 3 years ago

Hey man, I've been using this tutorial...but in the latest version (1.4.27), the cookie line no longer exists in "entry.js". Should we just add it manually the way it looks in your screenshot? Or has the method changed?

Works same way as before

paulescobar commented 3 years ago

Hey man, I've been using this tutorial...but in the latest version (1.4.27), the cookie line no longer exists in "entry.js". Should we just add it manually the way it looks in your screenshot? Or has the method changed?

Works same way as before

But in the tutorial, the guy is adding "sessionid" content to line 36 (which has that "cookie, tt_webid" content). In the scraper's latest update (1.4.28)...line 36 doesn't exist anymore. Above it just shows "user-agent" & "referer".

When you say "works same way" do you mean I should add that "cookie" line manually?

halmos commented 3 years ago

Has anyone managed to get this to work with the sessionList option?

alanblue2000 commented 3 years ago

@halmos add in brackets of header function as shown above: cookie: 'sessionid=XXXXXXXXXXXXXXXX;', it works for me

nicolaieg commented 2 years ago

After the 36 line I added this, but is not working referer: 'https://www.tiktok.com/', cookie: 'sessionid=XXXXXXXXXXXXXXXX;',