productionshoogl.blogg.se

Octoparse api
Octoparse api







octoparse api
  1. OCTOPARSE API HOW TO
  2. OCTOPARSE API INSTALL
  3. OCTOPARSE API FULL
  4. OCTOPARSE API CODE

📈 Collect Trending Videosįinally, maybe you simply want to collect trending videos for a simple content analysis, or just to keep up 🙂. If you want to collect a wide sample of data from TikTok, I advise starting with the suggested users crawler. This is good news if you want a representative dataset. įrom what I observed, the getSuggestedUsersbyIDCrawler method starts to branch out and find smaller, more niche accounts, which have tens of thousands of followers rather than hundreds of thousands or millions. This creates a list which contains a variety of different celebrity accounts, here are a few: (lizzo, 8900000 fans) (Wiz Khalifa, 1800000 fans) (Capuchina❗️👸🏼, 32600 fans) (Silvia Stephanie💓, 27600 fans) (The Weeknd, 1400000 fans) (Music videos, 33400 fans). To create a list of 100 suggested accounts using tiktok as the seed account, you just need the following code: tiktok_id = api.getUser('tiktok') suggested_100 = api.getSuggestedUsersbyIDCrawler(count=100, startingId=tiktok_id) Notably, the list of recommendations for washingtonpost and chunkysdead were identical, and there is a lot of overlap between the other recommendations, so this approach may not give you what you need.Īnother method to create a large list of users it to use the getSuggestedUsersbyIDCrawler to keep the snowball rolling, so to speak.

octoparse api

Here is what the output file looks like (I removed some rows and columns to make it readable on here):

octoparse api

OCTOPARSE API FULL

You will probably be mostly interested in just a few stats, which you can extract from the full dictionary with the following function: def simple_dict(tiktok_dict): to_return = _videos.csv'.format(username),index=False) The user_videos object is now a list of 100 video dictionaries (an example dictionary is here). To collect videos from the Washington Post TikTok account (one of my favorites), here is all you need to do in Python: from TikTokApi import TikTokApi api = TikTokApi() n_videos = 100 username = 'washingtonpost' user_videos = api.byUsername(username, count=n_videos)

OCTOPARSE API INSTALL

I will be using TikTok-Api by David Teather (run pip3 install TikTokApi to get the package). Second, if you want to track popularity over time, you will want to add timestamps to the statistics.)Ī good place to start is collecting videos from a given user. I have not yet tested it, but the API I demo here should integrate with your proxy quite easily. (A couple notes for the nerds: if you plan to make more than a few dozen requests, I suggest setting up a proxy.

OCTOPARSE API HOW TO

The remainder of this post covers how to do the following: I tried to keep it general and helpful for most use cases, but you will probably need to tweak it depending on what you are doing.

OCTOPARSE API CODE

With this in mind, it is important to understand what TikTok shows to millions of eyeballs every day, and to do that, we will need some data.īelow, I have included code for how to collect TikTok data in a variety of ways. In short, TikTok and its driving algorithms now have a sizeable real-world influence, especially considering that a typical user spends almost an hour per day watching videos on the platform.

  • The app has spread manipulated videos of Joe Biden.
  • Some users are encouraging Trump’s opposition to click on ads for Trump in order to drive up the campaign’s advertising costs.
  • Teens on TikTok organized “shopping cart abandonment” on Trump’s merchandise website in attempt to hide inventory from others.
  • K-pop fans used TikTok to prank Trump’s rally in Tulsa, purchasing tickets and then not showing up.
  • The platform is more than just a cool new app: as recent events have shown, its algorithms spread videos that can have real-world consequences.









    Octoparse api