redfox-python-sdk 0.7.0__py3-none-any.whl → 0.7.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,22 +16,38 @@ class TikTokAPI:
16
16
  def search_users(
17
17
  self,
18
18
  keyword: str,
19
- cursor: int = 0,
20
- rid: str = None,
19
+ offset: str = "0",
20
+ count: str = "20",
21
+ follower_count_filter: int = None,
22
+ profile_type_filter: int = None,
23
+ other_pref_filter: int = None,
21
24
  source: str = "搜索 TikTok 账号-SDK",
22
25
  ) -> dict:
23
26
  """
24
27
  TikTok 关键词搜索账号
25
28
 
26
29
  :param keyword: 搜索关键词(必填)
27
- :param cursor: 翻页游标,第一页为 0,每页 +10
28
- :param rid: 数据返回的 rid,翻页时传入,第一页传空
30
+ :param offset: 偏移量,从 0 开始,翻页 +count
31
+ :param count: 每页数量,默认 20
32
+ :param follower_count_filter: 粉丝数筛选:1=0~1K,2=1K~10K,3=10K~100K,4=100K 以上,不传不限制
33
+ :param profile_type_filter: 账号类型筛选:1=认证用户,不传不限制
34
+ :param other_pref_filter: 其他偏好:1=按用户名相关性,不传不限制
29
35
  :return: 搜索结果字典,包含 cursor/hasMore/userList
30
36
  """
31
- data: Dict[str, Any] = {"keyword": keyword, "cursor": cursor}
32
- if rid is not None:
33
- data["rid"] = rid
34
- return self._client.post("/story/api/deepSearch/tk/searchUser", data=data, source=source)
37
+ data: Dict[str, Any] = {
38
+ "keyword": keyword,
39
+ "offset": offset,
40
+ "count": count,
41
+ }
42
+ if follower_count_filter is not None:
43
+ data["followerCountFilter"] = follower_count_filter
44
+ if profile_type_filter is not None:
45
+ data["profileTypeFilter"] = profile_type_filter
46
+ if other_pref_filter is not None:
47
+ data["otherPrefFilter"] = other_pref_filter
48
+ return self._client.post(
49
+ "/story/api/tiktok/ability/searchUser", data=data, source=source
50
+ )
35
51
 
36
52
  def search_videos(
37
53
  self,
@@ -75,33 +75,23 @@ class YouTubeAPI:
75
75
  def get_transcript(
76
76
  self,
77
77
  video_url: str,
78
- format: str = None,
79
- include_timestamp: bool = None,
80
- send_metadata: bool = None,
81
- language: str = None,
82
78
  source: str = "提取 YouTube 视频字幕/文案-SDK",
83
79
  ) -> dict:
84
80
  """
85
- YouTube 视频提文案(提取字幕/口播文案)
86
-
87
- :param video_url: YouTube 视频 URL 或视频 ID(必填),
88
- 支持完整 URL、短 URL(youtu.be)或仅视频 ID
89
- :param format: 输出格式:json 或 text,默认 json
90
- :param include_timestamp: 是否包含时间戳,默认 True
91
- :param send_metadata: 是否包含视频元数据,默认 False
92
- :param language: 语言优先级列表,逗号分隔的语言代码,如 "zh,en,asr"
93
- :return: 文案提取结果字典
81
+ YouTube 视频字幕提取
82
+
83
+ 返回视频信息(标题、时长、发布时间、封面、描述)及各语言、
84
+ 各格式(srt/vtt/ttml/json3)的字幕下载地址,含人工字幕与自动生成字幕。
85
+
86
+ :param video_url: YouTube 视频链接(必填),
87
+ 如 "https://www.youtube.com/watch?v=jNQXAC9IVRw"
88
+ :return: 字幕提取结果字典,包含 subtitles 字幕轨道列表
94
89
  """
95
- data: Dict[str, Any] = {"videoUrl": video_url}
96
- if format is not None:
97
- data["format"] = format
98
- if include_timestamp is not None:
99
- data["includeTimestamp"] = include_timestamp
100
- if send_metadata is not None:
101
- data["sendMetadata"] = send_metadata
102
- if language is not None:
103
- data["language"] = language
104
- return self._client.post("/story/api/youtube/transcript", data=data, source=source)
90
+ return self._client.post(
91
+ "/story/api/parseWork/videoSubtitle/youtube",
92
+ data={"url": video_url},
93
+ source=source,
94
+ )
105
95
 
106
96
  def get_info(self, video_url: str, source: str = "获取 YouTube 视频字幕详情-SDK") -> dict:
107
97
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: redfox-python-sdk
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: RedFox 红狐数据平台 Python SDK — 同步+异步双客户端,自动重试,零配置
5
5
  Home-page: https://redfox.hk
6
6
  Author: RedFox
@@ -383,7 +383,7 @@ result = client.kuaishou.transcript_result(task_id=task["taskId"])
383
383
 
384
384
  ```python
385
385
  # 搜索用户
386
- client.tiktok.search_users(keyword="tech", cursor=0)
386
+ client.tiktok.search_users(keyword="tech", offset="0", count="20")
387
387
 
388
388
  # 搜索视频
389
389
  client.tiktok.search_videos(keyword="AI", count="20", sort_type="0", region="US")
@@ -14,7 +14,7 @@ redfox/endpoints/gpt_image.py,sha256=JZTL6z2g2kV7W0VL8JICWaR-_ZQ5gEpsiQEWUZto3cs
14
14
  redfox/endpoints/hotspot.py,sha256=VRa9apbYeD3p7ORav9jtItexriM8yLil9dkrI44UBBs,2966
15
15
  redfox/endpoints/instagram.py,sha256=kWjCGmjepnMD-vZjW_vMYylerLSEcKaNh4pDjPfhrc4,2916
16
16
  redfox/endpoints/kuaishou.py,sha256=D4_YD3kHYtF9Sn1dek_rNoe5i4eoauyYAsr_kfdY6qQ,4699
17
- redfox/endpoints/tiktok.py,sha256=vyNF4vklJ5WIPIVvfcv9Lsf7sQOrhcAj0pyGEKR1u5w,3042
17
+ redfox/endpoints/tiktok.py,sha256=6i6yZV9H3LgIJ0LeGXPGPnKd1h9MV0T95GYAwmeaVu8,3780
18
18
  redfox/endpoints/tools.py,sha256=lQDs28ozXVzIGcALu4CHYiFfgbAhQaaekIBhPIXTLxM,5879
19
19
  redfox/endpoints/toutiao.py,sha256=E8RPF79pzfu_CFnbEDWqfflPj8joMTkofBcvA7FPn5A,3250
20
20
  redfox/endpoints/twitter.py,sha256=-oHX4jQYDmf_2p1GK3cCacLR1rq2OeHcmbq4hCR-PAw,5369
@@ -23,9 +23,9 @@ redfox/endpoints/wechat_channels.py,sha256=caedmf85EsbCebVuvIEecavy6kPrVqkeBmSu_
23
23
  redfox/endpoints/weibo.py,sha256=s9feBGEN9hEsh9CL1Po_qx04auLlfw4P1nnTtutQwOU,1514
24
24
  redfox/endpoints/xiaohongshu.py,sha256=WPf8hLtIJNguG7VgRZ_EQ_OdlsDAX1fy26j2Scv5xUw,12719
25
25
  redfox/endpoints/yiche.py,sha256=x3oN1NQesm9mQ1-T-GMbBNNaPg1KtB0_rwmmVdQqVXg,3139
26
- redfox/endpoints/youtube.py,sha256=H7nwavR73onVeXpXyRw5Fw8nW_8q_ar4RjTP_a6yftA,4461
26
+ redfox/endpoints/youtube.py,sha256=RXklsFGbA5DMtdlRiLsDwMN6z5vz13xNAlb-u9vou68,3911
27
27
  redfox/endpoints/zhihu.py,sha256=lLPYMv_HpA7L9B8LIrCB_TSUQ7AJzSld6MwfWNuHZxg,1466
28
- redfox_python_sdk-0.7.0.dist-info/METADATA,sha256=ktUIfpRfLYf2m7dgftDu_ht0ncUDWCKy115GrDaj88M,25326
29
- redfox_python_sdk-0.7.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
30
- redfox_python_sdk-0.7.0.dist-info/top_level.txt,sha256=cOIfFv-M-TaEjpiRQy-OygdvvuHeZrlQSoRWMj0DaEM,7
31
- redfox_python_sdk-0.7.0.dist-info/RECORD,,
28
+ redfox_python_sdk-0.7.2.dist-info/METADATA,sha256=8aByZBFV02SJgkAiifXRIUrGLLqX1iSwmNMJBemK6Wo,25340
29
+ redfox_python_sdk-0.7.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
30
+ redfox_python_sdk-0.7.2.dist-info/top_level.txt,sha256=cOIfFv-M-TaEjpiRQy-OygdvvuHeZrlQSoRWMj0DaEM,7
31
+ redfox_python_sdk-0.7.2.dist-info/RECORD,,