TikTok Data Extractor avatar
TikTok Data Extractor

Pricing

from $2.00 / 1,000 results

Go to Store
TikTok Data Extractor

TikTok Data Extractor

Developed by

Clockworks

Clockworks

Maintained by Apify

Extract data about videos, users, and channels based on hashtags or scrape full user profiles including posts, total likes, name, nickname, numbers of comments, shares, followers, following, and more.

4.8 (27)

Pricing

from $2.00 / 1,000 results

569

Total users

28K

Monthly users

1.8K

Runs succeeded

98%

Issues response

2.1 days

Last modified

14 hours ago

TH

Getting unexpected keyword argument 'follow_redirects' when calling the API

Closed

theseusrex opened this issue
6 months ago

Starting yesterday, I started getting an error when trying to fetch TikTok post information using the ApifyClient package in Python. This code had been working for months prior and hadn't changed.

Here is the error:

Client.init() got an unexpected keyword argument 'follow_redirects'

And here is the code:

def download_slideshows(slideshow_urls, directory, username): # Given a user and a list of slideshow post urls, download the images in the slideshow to the # user's directory. Use Apify's "free-tiktok-scraper" API to do so. slideshow_files = [] parent_directory = os.path.dirname(directory) num_slideshows_downloaded = 0 client = ApifyClient("apify_api_Hk9[...]H0JhDNF")

run_input = {
"postURLs": slideshow_urls,
"shouldDownloadVideos": False,
"shouldDownloadCovers": False,
"shouldDownloadSubtitles": False,
"shouldDownloadSlideshowImages": False # don't download them to Apify's server
}
try:
# Get a list of json blobs representing slideshow posts
run = client.actor("clockworks/free-tiktok-scraper").call(run_input=run_input)
response = client.dataset(run["defaultDatasetId"]).list_items()
slideshows = response.items

... ... # do stuff with json

TH

theseusrex

6 months ago

Nevermind I updated the package and it fixed it lol

lukas.prusa avatar

Hi, thanks for opening this issue!

Yeah, our python clients are always getting updated so it's possible that you had some older broken version installed. If you want more stability then you can use our JavaScript client. It's also better integrated with our platform as a whole as most scrapers are built on JS/TS :)

Let me know if you have any more questions about the clients :) Thanks and happy scrapping!