Using Requests and Beautiful Soup, with the most recent Beautiful Soup 4 docs.
Install our tools (preferably in a new virtualenv):
pip install beautifulsoup4
| #!/usr/bin/env python | |
| """ | |
| Twitter's API doesn't allow you to get replies to a particular tweet. Strange | |
| but true. But you can use Twitter's Search API to search for tweets that are | |
| directed at a particular user, and then search through the results to see if | |
| any are replies to a given tweet. You probably are also interested in the | |
| replies to any replies as well, so the process is recursive. The big caveat | |
| here is that the search API only returns results for the last 7 days. So |
| // Bootstrap 5.3.0 | |
| @import "../bootstrap/mixins/banner"; | |
| @include bsBanner(""); | |
| // scss-docs-start import-stack | |
| // Configuration | |
| @import "../bootstrap/functions"; | |
| @import "../bootstrap/variables"; | |
| @import "../bootstrap/variables-dark"; |
Using Requests and Beautiful Soup, with the most recent Beautiful Soup 4 docs.
Install our tools (preferably in a new virtualenv):
pip install beautifulsoup4
Taught by Brad Knox at the MIT Media Lab in 2014. Course website. Lecture and visiting speaker notes.