docs: Sample code for additional data to scrape.
This commit is contained in:
32
README.md
32
README.md
@@ -76,9 +76,13 @@ python scraper --tweets=500 # Scrape 500 Tweets
|
|||||||
usage: python scraper [option] ... [arg] ...
|
usage: python scraper [option] ... [arg] ...
|
||||||
|
|
||||||
authentication options description
|
authentication options description
|
||||||
--user : Your twitter account Handle (e.g. @username)
|
--user : Your twitter account Handle.
|
||||||
|
e.g.
|
||||||
|
--user=@username
|
||||||
|
|
||||||
--password : Your twitter account password (e.g. password123)
|
--password : Your twitter account password.
|
||||||
|
e.g.
|
||||||
|
--password=password123
|
||||||
|
|
||||||
options: description
|
options: description
|
||||||
-t, --tweets : Number of tweets to scrape (default: 50).
|
-t, --tweets : Number of tweets to scrape (default: 50).
|
||||||
@@ -104,6 +108,18 @@ options: description
|
|||||||
-q "Philippine Marites"
|
-q "Philippine Marites"
|
||||||
--query="Jak Roberto anti selos"
|
--query="Jak Roberto anti selos"
|
||||||
|
|
||||||
|
-a, --add : Additional data to scrape and
|
||||||
|
save in the .csv file.
|
||||||
|
|
||||||
|
values:
|
||||||
|
pd - poster's followers and following
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
-a "pd"
|
||||||
|
--add="pd"
|
||||||
|
|
||||||
|
NOTE: Values must be separated by commas.
|
||||||
|
|
||||||
--latest : Twitter latest tweets (default: True).
|
--latest : Twitter latest tweets (default: True).
|
||||||
Note: Only for hashtag-based
|
Note: Only for hashtag-based
|
||||||
and query-based scraping.
|
and query-based scraping.
|
||||||
@@ -177,3 +193,15 @@ python scraper -t 100 -u elonmusk
|
|||||||
- Perform more `Advanced Search` using Twitter's Advanced Search, just setup the advanced query and copy the resulting string query to the program:
|
- Perform more `Advanced Search` using Twitter's Advanced Search, just setup the advanced query and copy the resulting string query to the program:
|
||||||
- **[Twitter Advanced Search](https://twitter.com/search-advanced)**
|
- **[Twitter Advanced Search](https://twitter.com/search-advanced)**
|
||||||
[](./img/advanced-search-01.png)
|
[](./img/advanced-search-01.png)
|
||||||
|
|
||||||
|
- **Scrape Additional Data**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python scraper --add="pd"
|
||||||
|
```
|
||||||
|
|
||||||
|
| Values | Description |
|
||||||
|
| :----: | :-------------------------------------------- |
|
||||||
|
| pd | Tweet poster's followers and following count. |
|
||||||
|
|
||||||
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user