Last active
December 22, 2019 21:35
-
-
Save pkshultz/427672fa72bbf5741b8f2cae616e27ba to your computer and use it in GitHub Desktop.
Retrieve links to a user's liked tweets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tweepy | |
consumer_key = "" | |
consumer_secret = "" | |
access_token = "" | |
access_token_secret = "" | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_token, access_token_secret) | |
api = tweepy.API(auth) | |
# Print out each favorited tweet | |
for page in tweepy.Cursor(api.favorites,id="",wait_on_rate_limit=True, count=200).pages(200): | |
for status in page: | |
print("https://twitter.com/" + status.user.id_str + "/status/" + status.id_str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tweepy.Cursor()
condition found in this Stack Overflow post.