Skip to content
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

search_posts_by_hashtag raised JSONDecodeError #9

Open
GreenLim opened this issue Nov 25, 2019 · 4 comments
Open

search_posts_by_hashtag raised JSONDecodeError #9

GreenLim opened this issue Nov 25, 2019 · 4 comments

Comments

@GreenLim
Copy link

great work!
but i encountered the following problem:

2019-11-25 18:42:12.571 | INFO | tiktok_bot.api.api:search_hashtags:219 - Search 1 hashtags with keyword: "cat"
Searching hashtags: 10it [00:01, 9.46it/s] 2019-11-25 18:42:13.632 | INFO | tiktok_bot.api.api:search_hashtags:231 - Found 1 results
Searching hashtags: 10it [00:01, 9.46it/s]
2019-11-25 18:42:13.632 | INFO | tiktok_bot.api.api:search_posts_by_hashtag:186 - Search 10 posts with hashtag: "cat"
Searching posts: 0%| | 0/10 [00:00<?, ?it/s]
Traceback (most recent call last):
File "tiktok.py", line 14, in
posts = bot.search_posts_by_hashtag("cat", count=10)
File "***path/.venv/lib/python3.7/site-packages/tiktok_bot/bot/bot.py", line 55, in search_posts_by_hashtag
posts = self.api.search_posts_by_hashtag(hashtag=tags[0], count=count)
File "***path/.venv/lib/python3.7/site-packages/tiktok_bot/api/api.py", line 191, in search_posts_by_hashtag
response = self._search_posts_by_hashtag(search_request)
File "***path/.venv/lib/python3.7/site-packages/tiktok_bot/api/api.py", line 177, in _search_posts_by_hashtag
search = ListPostsInHashtagResponse(**response.json())
File "***path/.venv/lib/python3.7/site-packages/httpx/models.py", line 930, in json
return jsonlib.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/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)

does search_posts_by_hashtag function need login?

@MaxiFilippov
Copy link

Did you solve it? I got the same error

@Muzammil099
Copy link

Muzammil099 commented Jan 27, 2020 via email

@MaxiFilippov
Copy link

MaxiFilippov commented Jan 27, 2020

Actually, response is empty

@adebayor123
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants