Тёмный

How To Scrape TikTok [2022] (3 ways) 

Phong | Code, AI, ML, Side Projects, Career, Tech
Подписаться 5 тыс.
Просмотров 8 тыс.
50% 1

3 methods for scraping TikTok with JavaScript, two will fail, one will succeed, you'll never guess which!
Check out the repo here: github.com/carcabot/tiktok-si...
0:00 Intro
0:17 Theory & Process
1:31 Method 1
2:11 Method 2
4:29 Method 3
7:15 Getting User's SecUid
8:00 Words
---
Connect with me: beacons.ai/pgt
I'm more active on TikTok, get the latest videos there first

Хобби

Опубликовано:

 

2 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 50   
@Suresh-br2zz
@Suresh-br2zz Год назад
Great video!
@PhongGT
@PhongGT Год назад
Thanks! Hope it was informative
@Joshuahendrix
@Joshuahendrix Год назад
The signer package trick was super cool 😎
@PhongGT
@PhongGT Год назад
I didn't believe it when I found it!
@ThanosDft
@ThanosDft Год назад
Awesome vid man, but i'd like to know which jacket are you wearing it looks dope! :D
@PhongGT
@PhongGT Год назад
Haha thanks. They're from Mark's Warehouse and I don't think they sell them anymore. The brand changes every now and then but they usually go by "men's overlay hoodie" and I specifically buy the ones that have T-Max insulation because it's rated for -20ºC or something. Definitely love them, I got a bunch on sale and they'll pretty much last me for life
@ThanosDft
@ThanosDft Год назад
@@PhongGT man thanks a lot im gonna check it out for sure!!!
@GCilinskas
@GCilinskas 8 месяцев назад
Does it still work? I get 95% failure rate on 3rd way with tiktok signature
@robertjudono4183
@robertjudono4183 Год назад
wow amazing video man! Could you also share the github links in the description
@PhongGT
@PhongGT Год назад
yeah can do, give me a bit
@lezole6692
@lezole6692 Год назад
please where can i learn how to scrap data using puppeteer
@SeongkuanWang
@SeongkuanWang Год назад
Thanks for the video! Is there a way to scrape the FYP to get all the most popular TT videos as opposed to scraping TT videos by usernames? If so, how can one achieve this?
@PhongGT
@PhongGT Год назад
I believe there's an endpoint for the trending data, you can go to the actual tiktok.com page and check the network calls
@tatianafrankcomedy
@tatianafrankcomedy 9 месяцев назад
thanks but how do you actually download the video file?
@francesko1763
@francesko1763 Год назад
Hi Phong, you are amazing man! I’m learning JavaScript right now, is possible to scrape TikTok live with JS?
@PhongGT
@PhongGT Год назад
Hey thanks! What do you mean by "live"? the most "live" you can get is if you sign up for webhooks from TikTok and they send you events whenever something happens on their servers. The next best thing would be to set your scrape frequency to as frequent as possible without triggering rate limits.
@francesko1763
@francesko1763 Год назад
@@PhongGT I'm in the begging of learning this things. I meant to pull the data from the live shows, like donations, comments etc in real time, put this data in a database, do something with it like for example randomly picking a person who donated and highlighting them during the live. The management of this data should be done in real time.
@juanpablorubio1691
@juanpablorubio1691 Год назад
Great video! Thanks for sharing it. Quick question, is it posible with tiktok-signature to get all videos from a hashtag? I’ve successfully implemented the example listed on the repo but I’m unable to get more than 30 results. Any clues that you can share with me ? Thanks again! 💪🏻
@PhongGT
@PhongGT Год назад
Thanks! I believe if you're using the video list endpoint, it returns a cursor and you can return that cursor back to get the next page of results. You can check out the TikTok API docs, it follows the same mechanics.
@juanpablorubio1691
@juanpablorubio1691 Год назад
@@PhongGT Thank you very much for your reply! I actually ended up using video per user method with the corresponding params.
@PhongGT
@PhongGT Год назад
@@juanpablorubio1691 that's great you were able to resolve it! 🙌
@JohnRandelleLardizabal
@JohnRandelleLardizabal Год назад
Hi Phong, awesome video explanation. But I'm receiving an error code ECONNRESET when running the user-info code to get the SecUid. Any idea if this is still working?
@PhongGT
@PhongGT Год назад
hmm shouldn't happen, do your other calls get that response?
@caruhhl
@caruhhl 5 месяцев назад
Does this still work? I get nothing when I run the user videos script
@binhdangthai1181
@binhdangthai1181 Год назад
how about msToken?. I dont see in this video
@lezole6692
@lezole6692 Год назад
the resources out there to learn how to scrape data with javs script arent the best, please what would you recommend
@PhongGT
@PhongGT Год назад
if you want to use python, it's fine, the techniques are the same, just that the libraries are different. it's usually just either finding a way to call the private API's or to grab the HTML and parse it
@HinPi
@HinPi Год назад
i cannot get SecUid, please help me
@douglas_dev1
@douglas_dev1 5 месяцев назад
how to get live streams chat? like to catch who is sending and what they are sending as gifts?
@tz9422
@tz9422 Месяц назад
did you figure it out?
@douglas_dev1
@douglas_dev1 Месяц назад
@@tz9422 nope =/
@adnielSsj
@adnielSsj Год назад
You said : "there's another video with a similar name for python that someone else did" But the other video of the guy using python is from 8 moths ago and he uses a library that no longuer works. Could you show us the way to do it?
@PhongGT
@PhongGT Год назад
the method in this video still works for me, I'm more of a JS guy than a python guy, maybe check out the repo the other video is using and see the issues to see if people are resolving any problems
@walidmat8972
@walidmat8972 Год назад
wich video please? i need to fo it using python
@delisandor5337
@delisandor5337 11 месяцев назад
cool
@rhemagenesis
@rhemagenesis Год назад
7:46 you typed C after debug prompt. Nothing happens for me right here. Looks like there's some video clip missing on what you did after pressing c
@PhongGT
@PhongGT Год назад
`c` means `continue`, so if your code isn't working somewhere downstream, it'll just stop, if you put some console.logs or debuggers around, you'll see this happening
@thanhvutien1970
@thanhvutien1970 Год назад
i want to get all video links of any 1 user but i only get the first 30 videos. I tried to use get more by searching for 'See More' button but what I get back is error timeout. Can you help me with the solution?
@PhongGT
@PhongGT Год назад
The video API is paginated, so you need to add pagination options to your request. Your pagination cursor will come from the response data of your first call that got the initial 30 videos
@SuheilTube
@SuheilTube Год назад
Creat 😊
@walidmat8972
@walidmat8972 Год назад
can you do it using python please ?
@PhongGT
@PhongGT Год назад
there are a few tutorials out there using python
@mrracheab9695
@mrracheab9695 Год назад
What about using python?
@PhongGT
@PhongGT Год назад
there's another video with a similar name for python that someone else did
@realhustl_
@realhustl_ Год назад
user info isn't working for me i am getting status code -1 with empty userInfo any help ?
@indianappguy
@indianappguy Год назад
i got the same, did you find solution to this?
@adnielSsj
@adnielSsj Год назад
Tell us if you did find the solution xD
@realhustl_
@realhustl_ Год назад
@@adnielSsj i just used tiktok signature and selenium to download the video without watermark using an api
@NamTran-nm4wr
@NamTran-nm4wr Год назад
Hello, this is amazing. I have a question tho, how do you know the url is hrefs[0].href; and the title is hrefs[1].title. Any guidance is greatly appreciated. Thanks
@PhongGT
@PhongGT Год назад
you would grab it using javascript dom manipulation, look up document.querySelector attribute selection. the other option is to feed the entire HTML into a parser like cheerio (js) or beautifulsoup (python)
Далее
The Biggest Mistake Beginners Make When Web Scraping
10:21
Советы на всё лето 4
00:23
Просмотров 546 тыс.
Industrial-scale Web Scraping with AI & Proxy Networks
6:17
I Paid a Stranger $25 to edit my Pizza Commercial
13:31
Always Check for the Hidden API when Web Scraping
11:50
The first video on Youtube...
3:12
Просмотров 14 млн
Scrape Videos from TikTok (No Code)
8:59
Просмотров 2,2 тыс.
Best exercises to lose weight ! 😱
0:19
Просмотров 15 млн