forked from erma0/douyin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
erma0
committed
Jul 28, 2023
0 parents
commit 33286ee
Showing
10 changed files
with
585 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
下载 | ||
dist/verify | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
.vscode/launch.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
![douyin](https://socialify.git.ci/erma0/douyin/image?description=1&font=Source%20Code%20Pro&forks=1&issues=1&language=1&name=1&owner=1&pattern=Circuit%20Board&stargazers=1&theme=Auto) | ||
|
||
# ✨抖音爬虫 | ||
|
||
> ❤️[开源不易,欢迎star⭐,若能帮助到您,可以请作者喝杯咖啡☕](#请作者喝杯咖啡) | ||
## 🏠项目地址 | ||
|
||
> [https://github.com/erma0/douyin](https://github.com/erma0/douyin) | ||
## 🍬功能 | ||
|
||
采集账号主页作品 | ||
|
||
> v2分支早已失效,偶然发现一个新的接口不用解密js,所以修改一下作为v2分支的补充。 | ||
> 必须填入cookie,只支持采集账号主页作品。 | ||
--- | ||
|
||
## 🚀使用 | ||
|
||
> 📍测试环境:`Win10/11 x64` + `Python3.8/11`。 | ||
> 📭**功能未全部测试,有问题请提交issue,也可加Q群`738029092`反馈(请提供测试链接以便复现问题)** | ||
> | ||
### 🍔主程序 | ||
|
||
1. Windows只需下载 [releases](https://github.com/erma0/douyin/releases) 或 `dist`目录中的两个文件 | ||
|
||
> ⚠️ Linux或macOS请从[官方地址下载对应的Aria2](https://github.com/aria2/aria2/releases),然后运行源码或自行编译 | ||
- douyin.exe | ||
- aria2c.exe | ||
|
||
2. 在程序所在目录打开命令行输入命令,或者Windows系统可以直接双击打开douyin.exe后根据提示输入目标地址 | ||
|
||
- 🐔使用帮助 | ||
|
||
```ps | ||
-t, --targets TEXT 必填。用户URL/sec_uid或文件路径(文件格式为一行一个),支持多次输入 | ||
-l, --limit INTEGER 选填。最大采集数量,默认不限制 | ||
-c, --cookie TEXT 选填。登录后cookie中sessionid的值 | ||
-g, --grab 选填。只采集信息,不下载作品 | ||
-d, --download 选填。直接下载采集完成的配置文件,用于采集时下载失败后重试 | ||
--help Show this message and exit. | ||
``` | ||
- 🏀使用例子(在程序所在目录打开命令行) | ||
```ps | ||
# 采集目标地址(主页)的全部作品 | ||
./douyin -t https://*/ | ||
./douyin -t sec_uid | ||
# 只采集目标信息,不下载 | ||
./douyin -g -t https://*/ | ||
# 直接下载采集过的目标地址(用于上次下载出错时) | ||
./douyin -d -t https://*/ | ||
# 限制数量采集,只采集目标地址的5条结果 | ||
./douyin -l 5 -t https://*/ | ||
# 采集多个目标地址 | ||
./douyin -t https://*1/ -t https://*2/ | ||
# 采集文件[user.txt]中的多个目标地址 | ||
./douyin -t ./user.txt | ||
# 指定cookie | ||
./douyin -c aaaaaaa -t ./user.txt | ||
``` | ||
> 💡手动使用aria2c下载 | ||
```ps | ||
aria2c -c --console-log-level warn -d ./下载目录 -i 生成的下载配置文件.txt | ||
``` | ||
## 🔨编译 | ||
> ❗**不能upx压缩,否则playwright无法启动** | ||
1. 安装依赖 | ||
```ps | ||
pip install -t -r ./requirements.txt | ||
``` | ||
2. 安装pyinstaller | ||
```ps | ||
pip install pyinstaller | ||
``` | ||
3. 打包EXE,图标可自行更换 | ||
- 编译主程序 | ||
```ps | ||
pyinstaller -F ./main.py -i ./ico.ico -n douyin | ||
``` | ||
## ☕请作者喝杯咖啡 | ||
![支付宝微信收款][1] | ||
[1]: https://erma0.cn/images/qrcode/shouqianma.png |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.