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 ...
随机推荐
- 中国MOOC_零基础学Java语言_第7周 函数_1分解质因数
第7周编程题 查看帮助 返回 第7周编程题 依照学术诚信条款,我保证此作业是本人独立完成的. 温馨提示: 1.本次作业属于Online Judge题目,提交后由系统即时判分. 2.学生可以在作业截 ...
- Web UI自动化测试基础——元素定位(二)
本篇文章整理了元素定位的基础知识——多个元素定位方式. 一.多个元素定位方式简介 同单个元素定位方式相同,多个元素定位方式也有与之对应的8种方式,即id.name.class_name.tag_nam ...
- Scratch少儿编程系列:(三)第一个例子 潜水员
一. 选择背景 在上一节系统界面的介绍中,选择"6角色"的左边,点击"从背景库中选择背景". 选择主题水下中的"underwater3". ...
- SVN的各种符号含义,svn的星号,感叹号,问号等含义
黄色感叹号(有冲突):--这是有冲突了,冲突就是说你对某个文件进行了修改,别人也对这个文件进行了修改,别人抢在你提交之前先提交了,这时你再提交就会被提示发生冲突,而不允许你提交,防止你的提交覆盖了别人 ...
- linux中文件IO
一. linux常用文件IO接口 1.1. 文件描述符 1.1.1. 文件描述符的本质是一个数字,这个数字本质上是进程表中文件描述符表的一个表项,进程通过文件描述符作为index去索引查表得到文件表指 ...
- 02: CI(持续集成)/CD(持续交付/持续部署)
1.1 持续集成.持续交付 介绍 参考博客:https://www.cnblogs.com/cay83/p/8856231.html 1.传统交付 1. 传统软件的开发与交付的周期都很漫长,从需求 ...
- 制作的第一个java小游戏
package java1; import java.awt.*; public class java1 extends Frame { //球桌和桌球图片 Image ball = Toolkit. ...
- npm学习(一)之安装、更新以及管理npm版本
安装npm 安装前须知: npm是在Node中编写的,因此需要安装Node.js才能使用npm.可以通过Node.js网站安装npm,或者安装节点版本管理器NVM. 如果只是想开始探索npm,使用No ...
- mac安装卸载brew
1.安装 访问https://brew.sh,copy图中的命令到命令行中,进行下载安装 2.卸载 官方版本的卸载: /usr/bin/ruby -e "$(curl -fsSL https ...
- JavaScript如何处理JSON数据
JSON (Javescript Object Notation)一种简单的数据格式,比xml更轻巧. JSON 是 JavaScript 原生格式,这意味着在 JavaScript 中处理 JSON ...