Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以有CLI 方案,get到特定帐号的所有视频基础数据么 #154

Open
nevertoday opened this issue Feb 13, 2023 · 11 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@nevertoday
Copy link

基础数据:发布时间,标题,url,点赞量,播放量,评论量,封面图地址...实际无水印地址...

@nevertoday nevertoday added the enhancement New feature or request label Feb 13, 2023
@Evil0ctal
Copy link
Owner

Evil0ctal commented Feb 13, 2023

API已经可以抓取相关的数据了。

@Evil0ctal
Copy link
Owner

如果你可以自己写一个CLI的话,欢迎PR到此项目中。

@nevertoday
Copy link
Author

好滴!

@Ppinnacle
Copy link

你好,求教如何使用此项目获取上述基础数据,谢谢了!

@nevertoday
Copy link
Author

我现在在用chatGPT教我怎么对接,貌似思路很清楚~ 有接口, 接口就是银行柜台~。。。。

@Evil0ctal
Copy link
Owner

使用这个包可以直接调用:https://pypi.org/project/douyin-tiktok-scraper/

import asyncio
from douyin_tiktok_scraper.scraper import Scraper

api = Scraper()

async def hybrid_parsing(url: str) -> dict:
    # Hybrid parsing(Douyin/TikTok URL)
    result = await api.hybrid_parsing(url)
    print(f"The hybrid parsing result:\n {result}")
    return result

asyncio.run(hybrid_parsing(url=input("Paste Douyin/TikTok share URL here: ")))

@Ppinnacle
Copy link

我现在在用chatGPT教我怎么对接,貌似思路很清楚~ 有接口, 接口就是银行柜台~。。。。

我是小白- - 之前用大部分都是cli直接运行 作者的项目太高深看不懂ε=(´ο`*)))唉 想收集点赞评论数啥的

@Evil0ctal
Copy link
Owner

如果不是python语言的话,你只需要将此项目部署在自己的服务器上,然后使用http get方法请求/api端点即可,本质上就是基于http的接口,你需要的数据会在返回的JSON数据中。

@Evil0ctal
Copy link
Owner

我现在在用chatGPT教我怎么对接,貌似思路很清楚~ 有接口, 接口就是银行柜台~。。。。

调用接口可能涉及到逆向工程,你需要系统性的学习一下。

@Ppinnacle
Copy link

受教 我需要再补补课了

@Evil0ctal
Copy link
Owner

不客气,你可以在自述文档中找到获取数据的方式。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants