Unofficial Twitter Hashtag Scraper using free proxies
Project description
Twitter Hashtag Scraper
Unofficial Twitter hashtag scraper using free proxies. No API keys required
Installation
pip install twitter-hashtag-scraper
Usage
Import the package and create an object of the scraper using:
- hashtag (str): hashtag to scrap
- x_guest_token (str): a valid token from Twitter. You can check the requests in your browser with Developer Tools, XHR filter and search for a request to https://api.twitter.com/2/search/adaptive.json? to obtain the value from the headers.
- use_proxy (boolean): boolean to activate proxies or not.
- output_path (str, optional): output path. Defaults to None.
- max_tweets (int, optional): max number of tweets to download else try to get tweets until scroll is over. Defaults to None.
Then calling the method collect() will retrieve the data. You need to have a valid x_guest_token checking the requests with Twitter.
from twitter_hashtag_scraper import TwitterHashtagScraper
TwitterHashtagScraper(hashtag="#MalagaCF",x_guest_token="1331317358300979202",use_proxy=False,output_path="/Users/youruser/Desktop",max_tweets=60).collect()
Project details
Release history Release notifications | RSS feed
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-hashtag-scraper-1.2.2.tar.gz
.
File metadata
- Download URL: twitter-hashtag-scraper-1.2.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fedca10b4bce50fa6608f39bf64c0b7f076eba3989a78880d02a6fcab0a320c9 |
|
MD5 | 0fd3c669aedf11d6103f1a172c33d90c |
|
BLAKE2b-256 | 00d8e64b4bcd18a3f64d3f3215715ccbc33700e06896070c45a9836cddbed75f |
File details
Details for the file twitter_hashtag_scraper-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: twitter_hashtag_scraper-1.2.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bc923d981aff7360e8f95df4280460335fda384f1b51b15134146f04f920bc3 |
|
MD5 | cb63f99d041328bf4bd3dd25e5b29739 |
|
BLAKE2b-256 | af1d0937099891caf15286b6bc911def5a5259205081a66893f43ab5cfb8b4f8 |