Scrape videos from TikTok
Updated over a week ago

You are browsing a tutorial guide for the latest Octoparse version. If you are running an older version of Octoparse, we strongly recommend you upgrade because it is faster, easier and more robust! Download and upgrade here if you haven't already done so!

TikTok is now a super hot video-focused social networking application that hosts a variety of short-form user videos, from genres like pranks, stunts, tricks, jokes, dance, and entertainment.

In this tutorial, we are going to show you how to scrape the trending video information from TikTok in only 3 steps with the Octoparse auto-detection feature.

The URL below is the TikTok trending video link we will use as an example. We will show you the steps to extract the Background music, Author URL, Author Id, Author Name, Likes, and Comments for example.

The main steps are shown in the menu on the right.[Download the demo task here]


1. "Go to Web Page" - to open the target website

  • Create your task by inputting the URL in the search box on the homepage

  • Click the Start button nearby to move on

Tip: if you get a captcha to solve after loading the web page, please toggle on Browse mode and resolve the captcha manually.

mceclip1.png
  • If you get a login pop-up, you can close it by clicking on the close button and choosing the Click element.


2. Auto-detect web page data - to create a workflow

  • Click Auto-detect web page data and wait for it to complete

    It may take long if there are many videos.

mceclip1.gif

We need to check the data selected with the auto-detection.

  • Go to Data Preview to see if you're okay with the current data output

    • Delete unnecessary data fields directly by clicking the delete icon

      mceclip13.png
    • Modify the data field names by double-clicking the headers

mceclip2.gif
  • Click Edit under the Add a page scroll to set up to scroll to the bottom of the page, scroll 20 times and wait for 1s for every scroll (you can set up more repeats if you want to get more videos)

  • Untick Click on a "Load More" button

  • Confirm the settings

  • Click Create workflow


3. Run your task - to get the data you want

  • Click Save and click Run on the upper right side

  • Select Run on your device to run the task on your computer, or select Run in the Cloud to run the task in the Cloud (for premium users only)

Here is the sample data.

mceclip3.png
Did this answer your question?