From e3029be42b021dcdad0736800a4f13428ddd5b98 Mon Sep 17 00:00:00 2001 From: imgyh <1974355683@qq.com> Date: Tue, 21 Feb 2023 18:21:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(tiktok):=20=E4=BF=AE=E5=A4=8D=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E4=BD=9C=E5=93=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TikTok.py | 2 +- TikTokUrls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TikTok.py b/TikTok.py index 483a518..a87c0f9 100644 --- a/TikTok.py +++ b/TikTok.py @@ -34,7 +34,7 @@ class TikTok(object): self.headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36', 'referer': 'https://www.douyin.com/', - 'Cookie': '__ac_nonce=063f2dac800532463833e; s_v_web_id=verify_lec77mky_PdkXTRSx_VwYB_4B32_BT52_CM9JP3QLtWnX; msToken=%s;odin_tt=324fb4ea4a89c0c05827e18a1ed9cf9bf8a17f7705fcc793fec935b637867e2a5a9b8168c885554d029919117a18ba69;' % self.utils.generate_random_str(107) + 'Cookie': '__ac_signature=_02B4Z6wo00f01CEKaogAAIDBqkHxaCCYIyghKm4AAGu9c3; s_v_web_id=verify_ledo1j1t_0NwhDQFJ_nLca_42o5_8tAA_T8CWm5E2M6LF; msToken=%s;odin_tt=324fb4ea4a89c0c05827e18a1ed9cf9bf8a17f7705fcc793fec935b637867e2a5a9b8168c885554d029919117a18ba69;' % self.utils.generate_random_str(107) } diff --git a/TikTokUrls.py b/TikTokUrls.py index 1add993..ac0f8b5 100644 --- a/TikTokUrls.py +++ b/TikTokUrls.py @@ -28,7 +28,7 @@ class Urls(object): self.USER_DETAIL = 'https://www.douyin.com/aweme/v1/web/user/profile/other/?' # 用户作品 - # cookies 暂时只需要 __ac_nonce, s_v_web_id两个参数 + # cookies 暂时只需要 __ac_signature, s_v_web_id两个参数, 好像会过期 # url 暂时不需要携带 msToken, X-Bogus, _signature # 每次返回数据很少 self.USER_POST = 'https://m.douyin.com/web/api/v2/aweme/post/?'