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 ...
随机推荐
- CentOS6.5 编译安装Nginx
一.准备编译环境 1. 系统为centos6.5最小安装,关闭selinux,关闭防火墙. 2. 安装编译工具 # yum -y install gcc gcc-c++ autoconf automa ...
- idea 使用过程中的一些设置记录
1.XML sql底色 在mapper文件中,SQL出现黄色的底色. ** settings ** > ** inspections ** 去掉 ** SQL ** 中的 ** No data ...
- ubutnu同时安装OpenCV2和OpenCV3及contrib
1.OpenCV2源码安装 安装依赖项 sudo apt-get install build-essential //build-essential是c语言的开发包,包含了gcc make gdb和l ...
- 使用bat脚本进行开机启动批处理
@echo off//关闭提示信息 start /b "F:\newProject\project\Kinect\Kinect\bin\Debug\" /min Kinect.ex ...
- [转帖]SQL 里面的 case when 的用法
SQL之case when then else end用法介绍 https://www.2cto.com/database/201804/740772.html 要培训了 看到有case when 之 ...
- (二)inlineCallbacks,同步方式写异步代码
一. 上篇提到了用defered对象注册回调的方式,来处理异步操作,这样大家都知道,实际情况代码很难搞的.因为当业务逻辑复杂后,这边一个异步操作,我们注册一个回调,代码跳到A地方,A里面也有异步操作, ...
- 不是我吹,Lambda这个坑你肯定不知道!
上周有小伙伴反馈zk连接很慢.整理出zk连接的关键逻辑如下: public class ClientZkAgent { //单例模式 private static final ClientZk ...
- 【PDF】手写字与识别字重叠
[PDF]手写字与识别字重叠 前言 同学平时上课用iPad记笔记,考试之前导出为PDF发给我后,我用PDF打开,发现可以直接Ctrl+F搜索一些词语.一直不知道是怎么做到的,毕竟里面的字都是手写的,不 ...
- Tarjan水题系列(4):HAOI2010 软件安装
题目: 现在我们的手头有N个软件,对于一个软件i,它要占用Wi的磁盘空间,它的价值为Vi.我们希望从中选择一些软件安装到一台磁盘容量为M计算机上,使得这些软件的价值尽可能大(即Vi的和最大). ...
- 清理Windows图标缓存 | 懒人屋
原文:清理Windows图标缓存 | 懒人屋 文章背景 这是一个抄袭的文章,原文在参考资料中 运行环境 操作系统:Windows 10 x64(1903) 清理脚本 @echo off rem 关闭W ...