twitter_scraper without API
Project description
Twitter scraper selenium
Python's package to scrap Twitter's front-end easily with selenium.
Twitter_scraper_without_API
this codes were developed to extract information from the twitter without using API as there are a limitation and costs for using official twitter API. yu can extract based on your keyword and time frame (in minutes). you can extract unlimitted number of twittes.
Pre-requests
- Python 3.6+
- Browsers(Firefox)
Instalation
you can install from source code using
git clone https://github.com/HamedMinaeizaeim/twitter_scraper_without_API.git
and then run
Python setup.py install
or you can run
pip install -r requirements.txt
alternatively, you can in stall using PyPl :
pip install twitter_scraper_without_API
How to use
to use this library, you just need to import the TwitterScrapper scrapper class and then specify your keyword search. By default, it will return all twitter within a minute. you can change it to extract twitts in the last n minutes. Here is a code to do that:
from src.twitter_scraper import TwitterScrapper
twitter = TwitterScrapper('bitcoin')
twitter.last_n_mins = 3
twitter.fetch_data()
Export option
you can export data as json, panda (Dataframe) and csv
df = twitter.store_data('dataFrame')
csv = twitter.store_data('csv')
json = twitter.store_data('json')
Privacy
there is no issue with privacy in this library and search is based on publicly avaialble information
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file twitter_scraper_without_api-0.0.5.tar.gz
.
File metadata
- Download URL: twitter_scraper_without_api-0.0.5.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 742dcb1eb8433890f27d312a4e9eb76213027743358a47b4624b6a84f5ddf203 |
|
MD5 | bc01304ea0c7010237e65b7c7dfb8a0c |
|
BLAKE2b-256 | 25ebfcf0982f690667a1d731d89a6a33672daba430dff0606cd7f5e164e965af |
File details
Details for the file twitter_scraper_without_api-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: twitter_scraper_without_api-0.0.5-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6190aed396d946e7ad5e0e014434c72f984a2681290420f2fc317061a805a809 |
|
MD5 | 4ba561ccd6dffc1fd2e4fca8cb21c353 |
|
BLAKE2b-256 | 4315ea2ec1b219ba0758af2c0a4d1cfdea6281853c836310742bab220113e96c |