-
-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting response to JSON failed response is below (probably empty) #215
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
I'll leave this issue open, but this isn't a library bug it's an installation issue. You may be able to find solutions to help you in the closed issues tab. There's a lot of potential fixes in those 100 issues or so. |
i got the same bug. library works before and from yesterday i got the same error |
I've made some changes to the library across the last two weeks is your issue still present after you upgrade your package? |
After upgrading to the latest version, the getbytag code works fine. |
OS: Windows
Python : 3.8
TikTokAPI: 3.4
Code: getTiktoksByHashtag.py
Chromedriver is in PATH and works properly.
================== RESTART: C:\examples\getTiktoksByHashtag.py =================
{'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36', 'accept-encoding': 'gzip, deflate, br', 'accept': 'application/json, text/plain, /', 'Connection': 'keep-alive', 'authority': 'm.tiktok.com', 'method': 'GET', 'path': '/share/item/list?aid=1988&app_name=tiktok_web&device_platform=web&referer=&user_agent=Mozilla%2F5.0+(Windows+NT+10.0%3B+Win64%3B+x64)+AppleWebKit%2F537.36+(KHTML,+like+Gecko)+Chrome%2F84.0.4147.125+Safari%2F537.36&cookie_enabled=true&screen_width=800&screen_height=600&browser_language=en-US&browser_platform=Win32&browser_name=Mozilla&browser_version=5.0+(Windows+NT+10.0%3B+Win64%3B+x64)+AppleWebKit%2F537.36+(KHTML,+like+Gecko)+Chrome%2F84.0.4147.125+Safari%2F537.36&browser_online=true&timezone_name=America%2FNew_York&priority_region=&appId=1233&appType=m&isAndroid=false&isMobile=false&isIOS=false&OS=windows&did=538604064®ion=US&secUid=&id=20884&type=3&count=1&minCursor=0&maxCursor=0&shareUid=&recType=&lang=en&verifyFp=2wHAOf5K0xlLo6fO&_signature=_02B4Z6wo00f01re.aCQAAIBD5WQb4XFd-j63v2yAAPLr7f', 'scheme': 'https', 'accept-language': 'en-US,en;q=0.9', 'referrer': 'https://www.tiktok.com/', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-site'}
Converting response to JSON failed response is below (probably empty)
Traceback (most recent call last):
File "C:\Python38\lib\site-packages\TikTokApi\tiktok.py", line 61, in getData
return r.json()
File "C:\Python38\lib\site-packages\requests\models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Python38\lib\json_init_.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\examples\getTiktoksByHashtag.py", line 7, in
tiktoks = api.byHashtag('viral', count=count)
File "C:\Python38\lib\site-packages\TikTokApi\tiktok.py", line 270, in byHashtag
res = self.getData(api_url, b, proxy=proxy, language=language)
File "C:\Python38\lib\site-packages\TikTokApi\tiktok.py", line 67, in getData
raise Exception('Invalid Response')
Exception: Invalid Response
The text was updated successfully, but these errors were encountered: