A simple scraper for Twitter (requires Python >= 3.6)

theenglishway (time) 9539167374 Use library for user-agent 7 лет назад
.github 4935b1edbf Initial commit 7 лет назад
docs 4935b1edbf Initial commit 7 лет назад
tests 3d9819e173 Add CLI command for user profile 7 лет назад
twhatter 9539167374 Use library for user-agent 7 лет назад
.editorconfig 4935b1edbf Initial commit 7 лет назад
.gitignore 4935b1edbf Initial commit 7 лет назад
.travis.yml 4935b1edbf Initial commit 7 лет назад
AUTHORS.rst 4935b1edbf Initial commit 7 лет назад
CONTRIBUTING.rst 4935b1edbf Initial commit 7 лет назад
HISTORY.rst 4935b1edbf Initial commit 7 лет назад
LICENSE 4935b1edbf Initial commit 7 лет назад
MANIFEST.in 4935b1edbf Initial commit 7 лет назад
Makefile 4935b1edbf Initial commit 7 лет назад
Pipfile 9539167374 Use library for user-agent 7 лет назад
Pipfile.lock 9539167374 Use library for user-agent 7 лет назад
README.rst 91e8c40ddb Fix setup.cfg 7 лет назад
setup.cfg 9539167374 Use library for user-agent 7 лет назад
setup.py 4935b1edbf Initial commit 7 лет назад
tox.ini 4935b1edbf Initial commit 7 лет назад

README.rst

========
Twhatter
========


A simple scraper for Twitter

Installation
------------

..highlight: shell

$ pip install --user -e git+https://code.theenglishway.eu/theenglishway-corp/twhatter

Use
---

Display some user's tweets

..highlight: shell

$ twhatter timeline realDonaldTrump --limit 10











Display their profile information

..highlight: shell

$ twhatter profile realDonaldTrump
User(id=25073877, screen_name='Donald J. Trump', join_date=datetime.datetime(2009, 3, 18, 0, 0), tweets_nb=40183, following_nb=45, followers_nb=57144827, likes_nb=7)

Put them into a local database (by default in /tmp/db.sqlite)

..highlight: shell

$ twhatter db timeline realDonaldTrump

Open a session on the local database and make queries with SQLAlchemy

..highlight: shell

$ twhatter db shell

..highlight: python

In [1]: session.query(Tweet).all()
Out[1]:
[