twint 安装及使用
分享这个post是自己方便查,还有中文网界对这个东西介绍太少。
更多的就看github项目twint吧。
Installation:
git+pip3:
git clone https://github.com/twintproject/twint.git
pip3 install -r requirements.txt
pip3 install twint
or pip3+pipenv:
pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
pipenv install -e git+https://github.com/twintproject/twint.git#egg=twint
You may meet module cannot found error when you try to run twint after installation. On ubuntu, add ~/.local/bin into your PATH by:
export PATH=$PATH:~/.local/bin
You may edit ~/.bashrc
file to permanately add the '~/.local/bin' into your PATH.
Usage:
Running the twint
cmd with arguments can give you results. A few simple examples to help you understand the basics:
twint -u username
- Scrape all the Tweets from user's timeline.twint -u username -s pineapple
- Scrape all Tweets from the user's timeline containing pineapple.twint -s pineapple
- Collect every Tweet containing pineapple from everyone's Tweets.twint -u username --year 2014
- Collect Tweets that were tweeted before 2014.twint -u username --since "2015-12-20 20:30:15"
- Collect Tweets that were tweeted since 2015-12-20 20:30:15.twint -u username --since 2015-12-20
- Collect Tweets that were tweeted since 2015-12-20 00:00:00.twint -u username -o file.txt
- Scrape Tweets and save to file.txt.twint -u username -o file.csv --csv
- Scrape Tweets and save as a csv file.twint -u username --email --phone
- Show Tweets that might have phone numbers or email addresses.twint -s "Donald Trump" --verified
- Display Tweets by verified users that Tweeted about Donald Trump.twint -g="48.880048,2.385939,1km" -o file.csv --csv
- Scrape Tweets from a radius of 1km around a place in Paris and export them to a csv file.twint -u username -es localhost:9200
- Output Tweets to Elastic searchtwint -u username -o file.json --json
- Scrape Tweets and save as a json file.twint -u username --database tweets.db
- Save Tweets to a SQLite database.twint -u username --followers
- Scrape a Twitter user's followers.twint -u username --following
- Scrape who a Twitter user follows.twint -u username --favorites
- Collect all the Tweets a user has favorited (gathers ~3200 tweet).twint -u username --following --user-full
- Collect full user information a person followstwint -u username --profile-full
- Use a slow, but effective method to gather Tweets from a user's profile (Gathers ~3200 Tweets, Including Retweets).twint -u username --retweets
- Use a quick method to gather the last 900 Tweets (that includes retweets) from a user's profile.twint -u username --resume resume_file.txt
- Resume a search starting from the last saved scroll-id.
More detail about the commands and options are located in the wiki
twint 安装及使用的更多相关文章
- docker——容器安装tomcat
写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...
- 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法
如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...
- Sublime Text3安装JsHint
介绍 Sublime Text3使用jshint依赖Nodejs,SublimeLinter和Sublimelinter-jshint. NodeJs的安装省略. 安装SublimeLinter Su ...
- Fabio 安装和简单使用
Fabio(Go 语言):https://github.com/eBay/fabio Fabio 是一个快速.现代.zero-conf 负载均衡 HTTP(S) 路由器,用于部署 Consul 管理的 ...
- gentoo 安装
加载完光驱后 1进行ping命令查看网络是否通畅 2设置硬盘的标识为GPT(主要用于64位且启动模式为UEFI,还有一个是MBR,主要用于32位且启动模式为bois) parted -a optima ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...
- 【原】nodejs全局安装和本地安装的区别
来微信支付有2年多了,从2年前的互联网模式转变为O2O模式,主要的场景是跟线下的商户去打交道,不像以往的互联网模式,有产品经理提需求,我们帮忙去解决问题. 转型后是这样的,团队成员更多需要去寻找业务的 ...
- tLinux 2.2下安装Mono 4.8
Tlinux2.2发行版基于CentOS 7.2.1511研发而成,内核版本与Tlinux2.0发行版保持完全一致,更加稳定,并保持对Tlinux2.0的完全兼容.Mono 4版本要求CentOS 7 ...
随机推荐
- Unity ZTest 深度测试 & ZWrite 深度写入
初学Shader,一开始对于渲染队列,ZTest 和 ZWrite一头雾水,经过多方查阅和实验,有了一些自己的理解.发此文与初学Shader的朋友分享,也算是为自己做个笔记.不对或不足之处欢迎指正. ...
- oracle rman catalog--ORA-01580: error creating control backup file
在测试rman catalog时,错误的设置了snapshot路径,报错 RMAN> show snapshot controlfile name; RMAN configuration par ...
- 正则表达式断言(Assertions)
一 零宽正向先行断言 x(?=y) 仅匹配被y跟随的x. const regExp = /Jack(?=Sparrow|Dawson)/g; const str = 'JackJones JackSp ...
- HTML5 列表、表格、媒体元素
无序列表 <ul> <li>范冰冰演藏族女孩</li> <li>拍集体合影后自拍</li> <li>诗隆甜蜜出游</li& ...
- 测试需要了解的技术之基础篇三__持续集成持续交付DevOps
持续集成.持续交付.DevOps 1.容器技术Docker:容器技术介绍.Docker安装与加速配置.Docker基础命令.Docker搭建selenium.Docker搭建持续集成平台Jenkins ...
- unity shader 热扭曲 (屏幕后处理)
效果: c# using System; using System.Collections; using System.Collections.Generic; using UnityEngine ...
- [Git] 026 config 命令的补充
少废话,上例子 1. 让命令更醒目 $ git config --global color.ui true 2. 偷懒 $ git config --global alias.st status 使用 ...
- [19/06/09-星期日] CSS基础_示例
一.图片格式&Hack(尽量不要使用) IE6对图片png-24的透明效果不支持,IE6中背景会发灰,可以使用png-8来代替.但是使用png-8代替之后清晰度会有所下降. 使用js来解决该问 ...
- 修改SpringBoot启动时的默认Banner图案
1.在src/main/resources下新建banner.txt,在文件中加入要显示的图案即可: 2.生成图案的网站: http://patorjk.com/software/taag/ http ...
- 哈希hash
定义 是把任意长度的输入(又叫做预映射pre-image)通过散列算法变换成固定长度的输出,该输出就是散列值 生成方法 hash() 哈希特性 不可逆 :在具备编码功能的同时,哈希算法也作为一种加密算 ...