Giter VIP home page Giter VIP logo

twitter-download's Introduction

Fork https://github.com/caolvchong-top 自己加了一份自动的py,仅需要改settings.json的储存位置

推特图片下载 ⟵(๑¯◡¯๑)

推特 图片 & 视频 下载,以用户名为参数,爬取该用户推文中的图片与视频(含gif)

支持排除转推内容 & 多用户爬取 & 时间范围限制

目前老马加了API的请求次数限制

当程序抛出:Rate limit exceeded 
即表示该账号当日的API调用次数已耗尽

if 选择包含转推:
  爬完一个用户需要调用的API次数约为:总推数(含转推) / 19
elif 不包含:
  会大大减少API调用次数

下载不计入次数 

Change Log

  • 2024-01-16

    • 适配 [ 喜欢(Likes) ] 标签页 (如有问题请发issue)
  • 2024-01-10

    • 新增统计数据 [ Favorite, Retweet, Reply ]
  • 2024-01-05

    • 适配Twieer新标签页 [ 亮点(HighLights) ]
  • 2023-12-12

    • 适配Twitter新API
  • 2023-10-12

    • 添加 生成爬取信息 功能
  • 2023-10-06

    • 添加 时间范围限制 功能
    • 统一文件保存格式
      • 文件夹:用户id (@后面的)
      • 文件:推文日期-[img/vid]_下载计数.文件后缀
  • 2023-09-15

    • 添加 视频下载 功能

部署

Linux :

git clone https://github.com/caolvchong-top/twitter_download.git 
cd twitter_download 
pip3 install httpx==0.23.0
#非0.23版本可能会出现不知名问题

运行 :

配置settings.json文件
python3 main.py 

Windows 和上面的一样,配置完setting.json后运行main.py即可

注意事项

settings.json

settings

运行截图

20230720134231

↑↑图是bug修复前的,仅效果参考

20230720134253

20230720135731

图片下载效果

test1

视频下载效果

test2

生成的CSV文件

屏幕截图 2023-10-12 223755

twitter-download's People

Contributors

onlylovelykiss avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.