How To Scrape TikTok [2022] (3 ways)

Поділитися
Вставка
  • Опубліковано 20 жов 2024

КОМЕНТАРІ • 50

  • @GCilinskas
    @GCilinskas 10 місяців тому +3

    Does it still work? I get 95% failure rate on 3rd way with tiktok signature

  • @Joshuahendrix
    @Joshuahendrix 2 роки тому +1

    The signer package trick was super cool 😎

    • @PhongGT
      @PhongGT  2 роки тому +1

      I didn't believe it when I found it!

  • @ThanosDft
    @ThanosDft Рік тому +1

    Awesome vid man, but i'd like to know which jacket are you wearing it looks dope! :D

    • @PhongGT
      @PhongGT  Рік тому +1

      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!!!

  • @lezole6692
    @lezole6692 Рік тому +1

    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

  • @caruhhl
    @caruhhl 8 місяців тому

    Does this still work? I get nothing when I run the user videos script

  • @SeongkuanWang
    @SeongkuanWang Рік тому +2

    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  Рік тому +1

      I believe there's an endpoint for the trending data, you can go to the actual tiktok.com page and check the network calls

  • @juanpablorubio1691
    @juanpablorubio1691 Рік тому +1

    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  Рік тому +1

      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 Рік тому +1

      @@PhongGT Thank you very much for your reply! I actually ended up using video per user method with the corresponding params.

    • @PhongGT
      @PhongGT  Рік тому +1

      @@juanpablorubio1691 that's great you were able to resolve it! 🙌

  • @JohnRandelleLardizabal
    @JohnRandelleLardizabal Рік тому +2

    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?

  • @tatianafrankcomedy
    @tatianafrankcomedy Рік тому

    thanks but how do you actually download the video file?

  • @lezole6692
    @lezole6692 Рік тому

    please where can i learn how to scrap data using puppeteer

  • @douglas_dev1
    @douglas_dev1 8 місяців тому +1

    how to get live streams chat? like to catch who is sending and what they are sending as gifts?

    • @tz9422
      @tz9422 3 місяці тому

      did you figure it out?

    • @douglas_dev1
      @douglas_dev1 3 місяці тому

      @@tz9422 nope =/

  • @Suresh-br2zz
    @Suresh-br2zz 2 роки тому +1

    Great video!

    • @PhongGT
      @PhongGT  2 роки тому

      Thanks! Hope it was informative

  • @francesko1763
    @francesko1763 Рік тому +1

    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.

  • @binhdangthai1181
    @binhdangthai1181 Рік тому

    how about msToken?. I dont see in this video

  • @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

  • @HinPi
    @HinPi Рік тому

    i cannot get SecUid, please help me

  • @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

  • @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

  • @robertjudono4183
    @robertjudono4183 2 роки тому +1

    wow amazing video man! Could you also share the github links in the description

    • @PhongGT
      @PhongGT  2 роки тому

      yeah can do, give me a bit

  • @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

  • @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

  • @delisandor5337
    @delisandor5337 Рік тому

    cool

  • @SuheilTube
    @SuheilTube Рік тому

    Creat 😊

  • @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)