Skip to content

Commit

Permalink
Fix #216
Browse files Browse the repository at this point in the history
  • Loading branch information
davidteather committed Aug 19, 2020
1 parent b2d53c3 commit 233b6c7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
28 changes: 21 additions & 7 deletions TikTokApi/tiktok.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,27 @@ def __init__(self, debug=False, request_delay=None):
# Get Browser Params
b = browser('newParam', newParams=True)

self.timezone_name = self.__format_new_params__(b.timezone_name)
self.browser_language = self.__format_new_params__(b.browser_language)
self.browser_platform = self.__format_new_params__(b.browser_platform)
self.browser_name = self.__format_new_params__(b.browser_name)
self.browser_version = self.__format_new_params__(b.browser_version)
self.width = b.width
self.height = b.height
try:
self.timezone_name = self.__format_new_params__(b.timezone_name)
self.browser_language = self.__format_new_params__(b.browser_language)
self.browser_platform = self.__format_new_params__(b.browser_platform)
self.browser_name = self.__format_new_params__(b.browser_name)
self.browser_version = self.__format_new_params__(b.browser_version)
self.width = b.width
self.height = b.height
except Exception as e:
if debug:
print("The following error occurred, but it was ignored.")
print(e)

self.timezone_name = ""
self.browser_language = ""
self.browser_platform = ""
self.browser_name = ""
self.browser_version = ""
self.width = "1920"
self.height = "1080"


self.request_delay = request_delay

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
setuptools.setup(
name = 'TikTokApi',
packages = ['TikTokApi'],
version = '3.4.2',
version = '3.4.3',
license='MIT',
description = 'The Unofficial TikTok API Wrapper in Python 3.',
author = 'David Teather',
Expand Down

0 comments on commit 233b6c7

Please sign in to comment.