Comments (15)
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.70. Please mark this comment with π or π to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
from tiktok-api.
Are you able to add a new line above line 11 to do print(data).
Whatβs the response once you do that?
from tiktok-api.
Actually, sorry I made that mistake. I thought this was an issue on my TikTokBot repo.
What value do you have results set to? Also is your directory to browsermob proxy correct?
from tiktok-api.
I changed the results value to 2 and now it seems to work. Is there a way to return the more results? And how would I go about returning a video url to download?
from tiktok-api.
Just figured out how to return the url by looking at the json file! But it would be nice to be able to return more values. results=2 is the most it seems to allow.
from tiktok-api.
Yeah that's weird. In the unit tests for the api allows for over 100 to be fetched at a single time.
Can you try to run
from TikTokApi import TikTokapi
import requests
api = TikTokapi("path/to/browsermob-proxy")
trending = api.trending(10)
verbose = 0
count = 10
import requests
while True:
url = "https://m.tiktok.com/share/item/list?id=&type=5&count=" + \
str(count) + "&minCursor=0&maxCursor=0&_signature=" + \
api.signature
r = requests.get(url, headers={"authority": "m.tiktok.com", "method": "GET", "path": url.split("https://m.tiktok.com")[0], "scheme": "https", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
"accept-encoding": "gzip, deflate, br", "accept-language": "en-US,en;q=0.9", "cache-control": "max-age=0", "upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"})
data = r.json()
response = []
if data["statusCode"] != 0:
if verbose == 1:
print("Invalid Signature Retrying")
else:
for tiktok in data["body"]["itemListData"]:
response.append(tiktok)
while True:
print(data)
if count > len(response) and str(data['body']['hasMore']) == "True":
url = "https://m.tiktok.com/share/item/list?id=&type=5&count=" + \
str(count - len(response)) + "&minCursor=0&maxCursor=" + \
data['body']['maxCursor'] + \
"&_signature=" + api.signature
r = requests.get(url, headers={"authority": "m.tiktok.com", "method": "GET", "path": url.split("https://m.tiktok.com")[0], "scheme": "https", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
"accept-encoding": "gzip, deflate, br", "accept-language": "en-US,en;q=0.9", "cache-control": "max-age=0", "upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"})
data = r.json()
if data["statusCode"] == 0:
for tiktok in data["body"]["itemListData"]:
response.append(tiktok)
else:
print(response)
break
from tiktok-api.
hmm, running that gives the same error.
from tiktok-api.
Does it print out anything beforehand?
from tiktok-api.
in server.log it looks like its failing to start jetty server
from tiktok-api.
Does it open the browser before giving you the error?
from tiktok-api.
Yes, this is the error: (main) Failed to start Jetty server. Aborting. java.net.BindException: Address already in use: bind
from tiktok-api.
Can you try to close any running java programs or other programs that may be binding to a port?
from tiktok-api.
any plans to make a follow and unfollow function?
from tiktok-api.
any plans to make a follow and unfollow function?
Not currently because to login captcha bypass is required. If I were to create account login features the user would have to solve the captcha manually until a better option is found.
from tiktok-api.
Would you be interested in helping me make just a simple follow/unfollow script for myself? Thanks
from tiktok-api.
Related Issues (20)
- [BUG] - Error encountered getting user videos: TikTokApi.exceptions.EmptyResponseException: None -> TikTok returned an empty response HOT 5
- [BUG] - Seems like Pagination is broken? HOT 1
- [INSTALLATION] - Question about Obtaining and Configuring ms_token in the Project HOT 12
- Ha
- [INSTALLATION] - ModuleNotFoundError: No module named 'TikTokApi' HOT 3
- What does error_code 1031 mean?
- Just Want Text
- cause of "EmptyResponseException: None -> TikTok returned an empty response" error HOT 4
- [FEATURE_REQUEST] - Multiple hashtags for api
- Getting more video ids than 30 fails HOT 10
- I got error " Failed to get msToken from cookies" HOT 2
- [BUG] - Empty userInfo for small accounts HOT 1
- Videos generated in the last 24 hours for a specific word
- Any function returns permanently empty fields HOT 6
- Is this repo available now?
- music have 40k videos but scrab only 4k videos HOT 3
- [FEATURE_REQUEST] - What you want here
- [INSTALLATION] - Change the region of content HOT 8
- [BUG] - Your Error Here HOT 1
- Issue with User HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiktok-api.