added examples

This commit is contained in:
Trevor Hobenshield
2023-04-10 12:31:37 -07:00
parent 3c57ab5189
commit 324e40e722
6 changed files with 18 additions and 2 deletions

BIN
assets/account.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

BIN
assets/scrape.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

BIN
assets/search.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 KiB

12
info/util.py Normal file
View File

@@ -0,0 +1,12 @@
import subprocess
from pathlib import Path
def compress(file: Path):
print(f'processing: {file}')
subprocess.call(
f'ffmpeg -i {file} -c:v libx265 -vtag hvc1 -c:a copy {file.stem}_min{file.suffix}',
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
shell=True,
)

View File

@@ -10,6 +10,8 @@ pip install twitter-api-client
### Automation
![](assets/account.gif)
```python
from twitter.account import Account
@@ -149,6 +151,8 @@ account.update_search_settings({
#### Get all user/tweet data
![](assets/scrape.gif)
```python
from twitter.scraper import Scraper
@@ -175,6 +179,8 @@ scraper.download_media([456, 567, 678])
#### Search
![](assets/search.gif)
```python
from twitter.search import search
@@ -189,8 +195,6 @@ search(
)
```
![](assets/example-search.gif)
- search results are output to `~/data/raw`
- ~400 search results rate limiting occurs