mirror of
https://github.com/trevorhobenshield/twitter-api-client.git
synced 2025-12-19 18:12:11 -05:00
rename
This commit is contained in:
18
readme.md
18
readme.md
@@ -12,15 +12,17 @@ pip install twitter-api-client
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Automation
|
### Automation
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from twitter_api_client.main import *
|
from twitter.main import *
|
||||||
from twitter_api_client.login import login
|
from twitter.login import login
|
||||||
|
|
||||||
usr, pwd = ..., ...
|
usr, pwd = ..., ...
|
||||||
session = login(usr, pwd)
|
session = login(usr, pwd)
|
||||||
|
|
||||||
# create tweet with images, videos, gifs, and tagged users
|
# create tweet with images, videos, gifs, and tagged users
|
||||||
r = create_tweet('test 123', session, media=[{'file': 'image.jpeg', 'tagged_users': [123234345456], 'alt': 'some image'}])
|
r = create_tweet('test 123', session,
|
||||||
|
media=[{'file': 'image.jpeg', 'tagged_users': [123234345456], 'alt': 'some image'}])
|
||||||
r = create_tweet('test 123', session, media=['test.jpg', 'test.png'])
|
r = create_tweet('test 123', session, media=['test.jpg', 'test.png'])
|
||||||
r = create_tweet('test 123', session, media=['test.mp4'])
|
r = create_tweet('test 123', session, media=['test.mp4'])
|
||||||
r = create_tweet('test 123', session)
|
r = create_tweet('test 123', session)
|
||||||
@@ -58,9 +60,10 @@ r = stats(50393960, session)
|
|||||||
|
|
||||||
### Scraping
|
### Scraping
|
||||||
#### User/Tweet data
|
#### User/Tweet data
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from twitter_api_client.scrape import *
|
from twitter.scrape import *
|
||||||
from twitter_api_client.login import login
|
from twitter.login import login
|
||||||
|
|
||||||
usr, pwd = ..., ...
|
usr, pwd = ..., ...
|
||||||
session = login(usr, pwd)
|
session = login(usr, pwd)
|
||||||
@@ -89,9 +92,10 @@ download_media(tweet_ids, session=session)
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Search
|
#### Search
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from twitter_api_client.search import search
|
from twitter.search import search
|
||||||
from twitter_api_client.config.search_config import search_config
|
from twitter.config.search_config import search_config
|
||||||
|
|
||||||
search(
|
search(
|
||||||
'(#dogs OR #cats) min_retweets:500',
|
'(#dogs OR #cats) min_retweets:500',
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="twitter-api-client",
|
name="twitter-api-client",
|
||||||
version="0.0.8",
|
version="0.0.9",
|
||||||
description="Twitter API",
|
description="Twitter API",
|
||||||
author="Trevor Hobenshield",
|
author="Trevor Hobenshield",
|
||||||
author_email="trevorhobenshield@gmail.com",
|
author_email="trevorhobenshield@gmail.com",
|
||||||
|
|||||||
2
setup.sh
2
setup.sh
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
# import shutil;import pathlib;[shutil.rmtree(p) for p in pathlib.Path().iterdir() if p.name in {'env', 'dist', 'twitter_api_client.egg-info'}];
|
# import shutil;import pathlib;[shutil.rmtree(p) for p in pathlib.Path().iterdir() if p.name in {'env', 'dist', 'twitter.egg-info'}];
|
||||||
python3 -m build
|
python3 -m build
|
||||||
python3 -m twine upload dist/*
|
python3 -m twine upload dist/*
|
||||||
Reference in New Issue
Block a user