-
-
Notifications
You must be signed in to change notification settings - Fork 975
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #382 from davidteather/nightly
V3.8.0 Fix Trending & UserPosts & Better Exception Handling & Dockerfile
- Loading branch information
Showing
19 changed files
with
379 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ res.html | |
tmp/* | ||
dist/* | ||
*.egg-info | ||
tmp/ | ||
tmp | ||
.pytest_cache/* | ||
test.mp4 | ||
test.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM mcr.microsoft.com/playwright:focal | ||
|
||
RUN apt-get update && apt-get install -y python3-pip | ||
COPY . . | ||
RUN pip3 install TikTokApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class TikTokCaptchaError(Exception): | ||
def __init__( | ||
self, | ||
message="TikTok blocks this request displaying a Captcha \nTip: Consider using a proxy or a custom_verifyFp as method parameters", | ||
): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class TikTokNotFoundError(Exception): | ||
def __init__(self, message="The requested object does not exists"): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class EmptyResponseError(Exception): | ||
def __init__(self, message="TikTok sent no data back"): | ||
self.message = message | ||
super().__init__(self.message) | ||
|
||
|
||
class JSONDecodeFailure(Exception): | ||
def __init__(self, message="TikTok sent invalid JSON back"): | ||
self.message = message | ||
super().__init__(self.message) |
Oops, something went wrong.