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.
I pulled the /UserMedia url ending with web browser dev tools and played around with modifying user_tweets_raw() and user_tweets(). Only a few parameters needed changing in these two functions to make it work.
I had to modify _gql_items() to pass a modified version of GQL_FEATURES when media was requested.
The return from twitter is slightly different for media and tweets. get_by_path() does not reach the actual content on the first call in the loop, but setting els equal to els[0]["content"]["items"] allows it to find the content and cursor.
Confusingly, the the second and subsequent call return a different format again. This time, if get_by_path() is set to "moduleItems" instead of "entries", the code can find all the the goods.
Some error handling may need to be added, but I have not run into issues.
When I used the new code, using user_media() was much faster than using user_tweets() and filtering out retweets and no media posts.
Thanks,
Pigglebear.