![](https://img.shields.io/github/last-commit/11philip22/twitter-media-downloader)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
# twitter-media-downloader
Downloads photos and videos from twitter. <br/>
Tested with python3.7 :) <br/>
If you have questions, requests or ideas send me a mail or open an issue.
# Usage
The main branch doesn't support Windows since curses is not included int the windows python libraries.
If you are using Windows please go to the logger branch. That branch uses logging instead of a curses output and is probably more stable.
I wont fix the main branch since this program will be integrated with the Twint project.
https://github.com/twintproject/twint-utils
### Use as program
Get prompted for input:
```
python3 core.py
```
Use a list:
```
python3 core.py list.txt
```
Dont use the username but the whole link. Like this: https://twitter.com/twitter
## Use the Twitter class in your own python program
``` python
from twitter import Twitter
usernames = ["username1", "username2", "username3"]
location = "../Downloads"
t = Twitter(usernames=usernames, location=location)
t.start()
```
### todo:
- [ ] Write queue to file when exit
- [ ] Detect if the photo is already downloaded before making a request (maybe with the id or something)
- [x] Make crawling and downloading run at the same time.
- [ ] Only ignore 403 Error while downloading videos. (does youtube dl only output errors as a string or am i retarded?)
- [ ] When the program stops while downloading photos write the id of the last downloaded photo to the resume file so the crawler knows where it left off.
- [x] Use pathlib or something so you can use it on Windows
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
twitter-media-downloader 从推特下载照片和视频。 用python3.7测试过:) 如果您有任何疑问,要求或想法,请给我发送邮件或提出问题。 用法 main分支不支持Windows,因为curses不包含在Windows python库中。 如果您使用的是Windows,请转到记录器分支。 该分支使用日志记录而不是curses输出,并且可能更稳定。 我不会修复主分支,因为此程序将与Twint项目集成在一起。 用作程序 提示输入: python3 core.py 使用清单: python3 core.py list.txt 不要使用用户名,而是使用整个链接。 像这样
资源详情
资源评论
资源推荐
收起资源包目录
twitter_media_downloader-master.zip (8个子文件)
twitter_media_downloader-master
twitter.py 9KB
core.py 3KB
utils.py 1KB
LICENSE 1KB
requirements.txt 39B
.gitignore 75B
twitter2.py 8KB
README.md 2KB
共 8 条
- 1
三渔
- 粉丝: 23
- 资源: 4544
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5