-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add 'executable_path' field to the 'api.create_sessions()' method #1136
Conversation
Are you sure you that this doesn't only changes your browser version and device profile used for rate limiting ? Don't you get the Empty Response error back at one point ? |
@ekorian , You are right, with these changes you can choose a browser (chromium). This solution is based on the comments:
|
I suspect that you get the Empty Response because of rate limiting policies at TikTok. |
I don't think that the problem is in rate limiting policies. Because running the same example code, that retrieves 30 trending videos, all the time I was getting the Empty Response. And running the modified example code (colab link), that also retrieves 30 videos, I don't get the error. If it was the rate limit (that is strange for 30 videos), it would not work in any case, would it? Also changing the browser for FireFox as it is done in this pull request - #1129 workes for the author. |
Quality Gate passedIssues Measures |
merge pls! I really need it 🥺 |
LGTM :) |
* Add 'executable_path' field to the 'api.create_sessions()' method (#1136) * Fixed retries loop (#1133) * Add option to select which browser playwright uses (#1129) * add browser selection option to create_sessions method * fix spelling typo --------- Co-authored-by: David Teather <34144122+davidteather@users.noreply.github.com> * Update hashtag.py (#1126) TikTok appears to have limited the number of posts that can be returned for a single hashtag search to 35 (e.g. bellingcat/tiktok-hashtag-analysis#28). Similar to how the `User.liked` method works, I set the batch size to 35 videos per request. * add executable path to str * bump ver --------- Co-authored-by: kkordik <99617240+Kkordik@users.noreply.github.com> Co-authored-by: ekorian <korian.edeline@gmail.com> Co-authored-by: Will Howes <39531537+willmhowes@users.noreply.github.com> Co-authored-by: Tristan Lee <tristan@bellingcat.com>
Adding
executable_path
can solve the issue:EmptyResponseException: None -> TikTok returned an empty response
#1090
The example on how it works is in google colab:
https://colab.research.google.com/drive/14FV3Ja3rmrubQ1FVLNhByTz1n_MPPlKA#scrollTo=h9tG2EQM_Ekd
Edited: Forgot to mention that to actually solve the issue you should install an older version of Google Chrome and specify its executable path when calling the
create_sessions
method.(this solution and the table were provided by the author of the #1090 (comment))