
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Twitter High level scraper for humans.
Manual install via git :
$ git clone https://github.com/0x0ptim0us/twpy.git
$ cd twpy
$ python setup.py install
Install using pip:
$ pip install twpy
# or
$ python -m pip install twpy
Create Twpy object :
from twpy import TwpyClient
# create twpy client object
tc = TwpyClient()
with proxy :
# or you can pass proxy
tc = TwpyClient(proxy="127.0.0.1:8080")
Get twpy current version :
tc.__version__
# '1.2.4'
Get user followers:
# get user followers, limited up to 50
# interval : delay between each request, default is 0 for no delay
# proxy : send traffic through proxy, default is none
followers_data = tc.get_followers(username="elonmusk", limit=50, interval=1)
Get user timeline:
tweets = tc.get_timeline(username="elonmusk", limit=50)
Get user profile:
user_info = tc.get_user(username="elonmusk")
Convert result object to other data structures :
from twpy.serializers import to_pandas, to_json, to_list
# convert result to pandas data frame, json and list
# pandas
pandas_sample = to_pandas(followers_data)
# json
json_sample = to_json(followers_data)
# list
list_sample = to_list(followers_data)
Search example:
# search user tweets until 2015
tweets = tc.search(username="elonmusk", until="2015")
# add limit and interval
tweets = tc.search(username="elonmusk", until="2015", limit=100, interval=1)
# search tweets contains `love` word
tweets = tc.search(query="love", limit=100, interval=1)
# search tweets which contains `love` word and were tweeted since 2015-01-01
tweets = tc.search(query="love", since="2015-01-01", limit=10)
method | description |
---|---|
get_friends() | get user followings/friends |
get_timeline() | get user timeline/tweets |
get_user() | get user profile info |
search() | search tweets with query and username |
Fardin Allahverdinazhand - @0x0ptim0us - 0x0ptim0us@gmail.com Distributed under the MIT license. see LICENSE.txt for more information.
FAQs
Twitter High level scraper for humans.
We found that twpy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.