Adds 'images_urls' and 'has_video' attributes to tweets #210
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! I made small modifications to be able to download the images coming with a tweet. I thought it might be useful. :)
By the way, it's related to #200.
Now, a Tweet object contains:
It is currently not possible to get the video url, because it does not come with the tweet HTML (it seems to be added after loading with Javascript).
Edit: Videos are added by an obfuscated script, which uses an API requiring parameters which are very difficult to get (they're hidden in an unreadable bloat of JS). The URL of the API is something like
https://api.twitter.com/1.1/videos/tweet/config/XXX.json
(with XXX = the ID of the tweet), it requires an authorization header and some cookies.