From 61126cbdc7882609898649ca19cdbce46c8651fb Mon Sep 17 00:00:00 2001 From: David Teather <34144122+davidteather@users.noreply.github.com> Date: Sat, 24 Oct 2020 11:32:07 -0500 Subject: [PATCH 1/5] Update examples --- examples/downloadTikTok.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/downloadTikTok.py b/examples/downloadTikTok.py index 6cd4f342..837d8f76 100644 --- a/examples/downloadTikTok.py +++ b/examples/downloadTikTok.py @@ -3,11 +3,6 @@ # Starts TikTokApi api = TikTokApi() -# Below is if you have a DIRECT tiktok url -tiktokData = api.get_Video_By_Url( - "https://www.tiktok.com/@ceciliaannborne/video/6817602864228207878", return_bytes=1 -) - # Below is used if you have the download url from the tiktok object, but maybe not the full object tiktokData = api.get_Video_By_DownloadURL( api.trending(count=1)[0]["video"]["downloadAddr"] From a87de8a5b5a6586c59596922a4d26c8466d3109f Mon Sep 17 00:00:00 2001 From: David Teather <34144122+davidteather@users.noreply.github.com> Date: Sat, 24 Oct 2020 11:40:49 -0500 Subject: [PATCH 2/5] Added 3.9 to tests --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d840d5ce..8669415c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: - "3.6" - "3.7" - "3.8" + - "3.9" - "3.9-dev" - "nightly" From 79fc09aeb3012e833176f4bca83ef87b166462ab Mon Sep 17 00:00:00 2001 From: David Teather <34144122+davidteather@users.noreply.github.com> Date: Sat, 24 Oct 2020 11:52:45 -0500 Subject: [PATCH 3/5] I guess travis still doesn't support 3.9 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8669415c..d840d5ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ python: - "3.6" - "3.7" - "3.8" - - "3.9" - "3.9-dev" - "nightly" From 417775f8472b56f3c3bf0d346afe55c7ea3fb3df Mon Sep 17 00:00:00 2001 From: David Teather <34144122+davidteather@users.noreply.github.com> Date: Sun, 25 Oct 2020 20:03:34 -0500 Subject: [PATCH 4/5] Download TikTok Fix --- TikTokApi/__pycache__/browser.cpython-38.pyc | Bin 5522 -> 5564 bytes TikTokApi/__pycache__/tiktok.cpython-38.pyc | Bin 32541 -> 33181 bytes TikTokApi/browser.py | 6 +- TikTokApi/tiktok.py | 112 +++++++++++++------ setup.py | 2 +- 5 files changed, 85 insertions(+), 35 deletions(-) diff --git a/TikTokApi/__pycache__/browser.cpython-38.pyc b/TikTokApi/__pycache__/browser.cpython-38.pyc index 6e3064baa2b13935c2d57a45754b532105ca9f8d..bd91a826ad1579ac250bbe4289713e73aa7e7575 100644 GIT binary patch delta 1174 zcmZ`&O=weD6u#%ZhF5Djf=U;aMz*9|F16(b_g?uEDjGv2}y^rCTNc7Z$i_{fA#$OM zn1~BQn1T!Br+JP|nW!W}U9cHlJ{MM~&lvI{YKgWb>`-sp!s&o;2U(7ZWR68l5}DK> zTh@A()#K31`OYgIiR!VISy)b(V;ulS1%!tyEi%#a|DZ-3i%8E=qd~i{{z`y~K2cURwFrHy-mwJhj*J#Jt3uVvQ`= zm=-%EX>jR{{uv;zy7AGNF6u(1jF;f5w?=l;I(#~rBj_hsPv9YRt?FDWXwHtKyWFTe zbAwA>tq_4Z2B=@nC$L(@`Fdjr8FVS}B1|ov<`Vz~^&oL$bQAJj^P+54Ypqt-t~O_9 z=Nk3uL{Pg6G72&&G6I^SsQ8S!Y8}&_g1X0dE5p8Dz!P}*LK@z5GDruRwlDgG*U_#6 zUX`a_*n4n19cLBXQ6tU^*rGl;d!VFtx`&~tuDR3jr+V*x$Zw?r+XxB-G{tf|!7u7# zvUF$_nK6PL1iJ`UAarBX&3dC7mlKVtT9;q0$@=8)<%=>;n%)YeJV=&_x~Mk-RZord z(YfUq!Cr!W>UcV5Tt~ANsz<54ngdH;Qtx14KdA=@=>Ie9$)EQ~P8EVI!7+j#I`)z4 zIat-Hj*cH$DF|bw2$!3@JY|1plkC%xgHK2K<#812yWebGWq8 zsZy?#%N14ii}?`>Ttg5|%UZIcF*>L2_@$%NVv8=B$D$FWG3>4Xtm8bE9Ns_$g`@@e@WMP{41S#2K4{{ delta 1137 zcma)4OHUL*5boL;c4lXG_Bs2M$BKZ!3d#i&!1xSeqF{{1Xdr~xpgdgT>>dmmLZT<* zi&&fthuuU^o(vZb9*r@ch=~`xnD7HU`8W`@YKEZEm^hRErsk`!zpn1Cm&M0L>w;w& zf}UIFmdDS(uqFT!cmoQc;S$W{L!8=v!t~W?9H&u!hv`7qq71lVT$74aWt|L4P3kh_ ziWw~XEiNHMWsF4`?P4fn(=+TP5G`*cX;yM*=&O^C1a*8ic%WL7RZiFva6fQ z7C;U^*7f49;CfGZLoH9vO*uB*pOa%qGwf!_Fr*lo8R85r*sishSqjVZ1j58i+AC

^1i!ilX)+YcO@O|hmwBoo?pYyUBOFZDF@qA}+*%%4D1bnUcVUxL*sKhIY zYEs5zycW0vbP6_pHv7TGo^S)K;7E8KideAvVIPiKL(qZGtQn|bEb=Me#ird14Gi4F z&VGgin2UC&>N!*ydKeBetcNG4wMG zF#NHR0&%x#_=kc|5}i>c8wf(+M_4t~;Fh7Sw!}8!)FGaGgyASbN8I^$#Vk6_;9bZW zj()2j&n7bM|4|rU!5O+nHE74W2ul();@zogC)ksz!(!2Gbck~?*r;#Und-Tp$ UtxR8^bWSiihC`{FilW#31OoN#=l}o! diff --git a/TikTokApi/__pycache__/tiktok.cpython-38.pyc b/TikTokApi/__pycache__/tiktok.cpython-38.pyc index 57ec2f7fceb2b4d405b5f8ee1b821f7b171d41d7..fd9ab35764fa591d7b3c5b853dac082acc2ba57f 100644 GIT binary patch delta 6668 zcmbtYdr%z5nctqBoqaE$T>)!}fMgkKB_U*6mSurt5D39ZB1nKEjUTXV56i+nP|sk@ zYF5~m5D}@dKQpm;Oq+2{^skR?w+r|clYyG$n)o<$Y3}eaKYc54bKeS^V;ReuSkTBX)^U( zBy)uZJmjTu!=6_{T1>&cwfq-PB6eL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r}tJ)a?6D< zGN*r##>$Fj(7XV8mP|06%cz=7$^u(2ZED`x*}S>4p}V;$;P$6}wko>j*Tah6dS~~8 zEPi#sFZl-}qe`3);k^OIdSpmfhupAn(%Q-mg|hosa0aQJ$crzfkD!X4pz*%`ab3~i z*;W3C=8q;ceR@}we>G0wMk%Bxq+x5npKnNW35BT|Q)C($om6Pwh@^*s7yqZL{&D!= z;J2Re<0A_7EBlmCLYMl7l{AZq$|hw5O1-2ja&Y6)aB@`>r7J42*fALPo&Gu;XjHI?-@bE7?Rltu{ zGyCYdN*qsIBZWfBh`yptiVr3r*PD(`pp>B4z~^ZdduNn2G~zBS?eJw}75tli2U>&k zYY{vM8xZOccrE5>0$&H&v8m}OB_Wbyx1v8S(2=yjQPRt`Y?12f% z_5oSRE=@E*erdS%)QX8B2L3;TuZ zkiyS85CCXa=pGBvUQ3&BfgA0r4FI+etJ#4A&4r4^VAenO)`7b1r;$$^t_%Dh#fkre zM!DNrXmaCZD^R9`UlqCyXe#4`eHh { " + get_acrawler() + " }") self.signature = await self.page.evaluate( diff --git a/TikTokApi/tiktok.py b/TikTokApi/tiktok.py index daecf52d..4a340ec9 100644 --- a/TikTokApi/tiktok.py +++ b/TikTokApi/tiktok.py @@ -138,10 +138,17 @@ def getBytes(self, b, **kwargs) -> bytes: r = requests.get( url, headers={ - "method": "GET", - "accept-encoding": "gzip, deflate, br", - "referer": b.referrer, - "user-agent": b.userAgent, + "Accept": "*/*", + "Accept-Encoding": "identity;q=1, *;q=0", + "Accept-Language": "en-US;en;q=0.9", + "Cache-Control": "no-cache", + "Connection": "keep-alive", + "cookie": "tt_webid_v2=" + b.did, + "Host": url.split("/")[2], + "Pragma": "no-cache", + "Range": "bytes=0-", + "Referer": "https://www.tiktok.com/", + "User-Agent": b.userAgent }, proxies=self.__format_proxy(proxy), ) @@ -762,7 +769,7 @@ def getHashtagDetails(self, hashtag, **kwargs) -> dict: b = browser(api_url, proxy=proxy, executablePath=self.executablePath) return self.getData(b, proxy=proxy) - def getRecommendedTikToksByVideoID(self, id, **kwargs) -> dict: + def getRecommendedTikToksByVideoID(self, id, count=30, **kwargs) -> dict: """Returns a dictionary listing reccomended TikToks for a specific TikTok video. :param id: The id of the video to get suggestions for. @@ -779,22 +786,53 @@ def getRecommendedTikToksByVideoID(self, id, **kwargs) -> dict: maxCount, offset, ) = self.__process_kwargs__(kwargs) - query = { - "count": 24, - "id": id, - "type": 0, - "secUid": "", - "maxCursor": maxCursor, - "minCursor": minCursor, - "shareUid": "", - "recType": 3, - "language": language, - } - api_url = "{}share/item/list?{}&{}".format( - BASE_URL, self.__add_new_params__(), urlencode(query) - ) - b = browser(api_url, proxy=proxy, executablePath=self.executablePath) - return self.getData(b, proxy=proxy)["body"] + + response = [] + first = True + + while len(response) < count: + if count < maxCount: + realCount = count + else: + realCount = maxCount + + query = { + "count": realCount, + "id": 1, + "secUid": "", + "maxCursor": maxCursor, + "minCursor": minCursor, + "sourceType": 12, + "appId": 1233, + "region": region, + "priority_region": region, + "language": language, + } + api_url = "{}api/recommend/item_list/?{}&{}".format( + BASE_URL, self.__add_new_params__(), urlencode(query) + ) + b = browser( + api_url, + language=language, + proxy=proxy, + executablePath=self.executablePath, + ) + res = self.getData(b, proxy=proxy) + + for t in res.get("items", []): + response.append(t) + + if not res["hasMore"] and not first: + if self.debug: + print("TikTok isn't sending more TikToks beyond this point.") + return response[:count] + + realCount = count - len(response) + maxCursor = res["maxCursor"] + + first = False + + return response[:count] def getTikTokById(self, id, **kwargs) -> dict: """Returns a dictionary of a specific TikTok. @@ -813,6 +851,7 @@ def getTikTokById(self, id, **kwargs) -> dict: maxCount, offset, ) = self.__process_kwargs__(kwargs) + did = kwargs.get("custom_did", None) query = { "itemId": id, "language": language, @@ -820,7 +859,7 @@ def getTikTokById(self, id, **kwargs) -> dict: api_url = "{}api/item/detail/?{}&{}".format( BASE_URL, self.__add_new_params__(), urlencode(query) ) - b = browser(api_url, proxy=proxy, executablePath=self.executablePath) + b = browser(api_url, proxy=proxy, executablePath=self.executablePath, custom_did=did) return self.getData(b, proxy=proxy) def getTikTokByUrl(self, url, **kwargs) -> dict: @@ -840,6 +879,7 @@ def getTikTokByUrl(self, url, **kwargs) -> dict: maxCount, offset, ) = self.__process_kwargs__(kwargs) + custom_did = kwargs.get("custom_did", None) if "@" in url and "/video/" in url: post_id = url.split("/video/")[1].split("?")[0] else: @@ -848,7 +888,7 @@ def getTikTokByUrl(self, url, **kwargs) -> dict: "https://www.tiktok.com/@therock/video/6829267836783971589" ) - return self.getTikTokById(post_id, language=language, proxy=proxy) + return self.getTikTokById(post_id, language=language, proxy=proxy, custom_did=custom_did) def discoverHashtags(self, **kwargs) -> dict: """Discover page, consists challenges (hashtags) @@ -1168,7 +1208,7 @@ def get_Video_By_TikTok(self, data, **kwargs) -> bytes: try: api_url = data["itemInfos"]["video"]["urls"][0] except Exception: - api_url = data["itemInfo"]["itemStruct"]["video"]["downloadAddr"] + api_url = data["itemInfo"]["itemStruct"]["video"]["playAddr"] return self.get_Video_By_DownloadURL(api_url, proxy=proxy) def get_Video_By_DownloadURL(self, download_url, **kwargs) -> bytes: @@ -1190,16 +1230,24 @@ def get_Video_By_DownloadURL(self, download_url, **kwargs) -> bytes: return self.getBytes(b, proxy=proxy) def get_Video_By_Url( - self, video_url, return_bytes=0, chromedriver_path=None + self, video_url, **kwargs ) -> bytes: - """(DEPRECRATED) - Gets the source url of a given url for a tiktok + ( + region, + language, + proxy, + minCursor, + maxCursor, + maxCount, + offset, + ) = self.__process_kwargs__(kwargs) + did = str(random.randint(10000, 999999999)) + + tiktok_schema = self.getTikTokByUrl(video_url, custom_did=did) + download_url = tiktok_schema['itemInfo']['itemStruct']['video']['downloadAddr'] - video_url - the url of the video - return_bytes - 0 is just the url, 1 is the actual video bytes - chromedriver_path - path to your chrome driver executable - """ - raise Exception("Deprecated. Other Methods Work Better.") + b = browser(download_url, proxy=proxy, custom_did=did) + return self.getBytes(b, proxy=proxy) def get_Video_No_Watermark(self, video_url, return_bytes=0, **kwargs) -> bytes: """Gets the video with no watermark diff --git a/setup.py b/setup.py index fa6c2027..f2a21164 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name="TikTokApi", packages=["TikTokApi"], - version="3.5.7", + version="3.5.8", license="MIT", description="The Unofficial TikTok API Wrapper in Python 3.", author="David Teather", From 2cb655dbdca91470f677d0e713b5b61d1f6d787b Mon Sep 17 00:00:00 2001 From: David Teather <34144122+davidteather@users.noreply.github.com> Date: Sun, 25 Oct 2020 20:04:32 -0500 Subject: [PATCH 5/5] Black formatting --- TikTokApi/browser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TikTokApi/browser.py b/TikTokApi/browser.py index 911f29e0..073f0909 100644 --- a/TikTokApi/browser.py +++ b/TikTokApi/browser.py @@ -14,6 +14,7 @@ async_support = False + def set_async(): global async_support async_support = True @@ -30,7 +31,7 @@ def __init__( debug=False, newParams=False, executablePath=None, - custom_did=None + custom_did=None, ): self.url = url self.debug = debug