Created
December 23, 2020 19:06
-
-
Save oliver-batey/b3a7cb0cc50c4a93d8765b5a2fca3751 to your computer and use it in GitHub Desktop.
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
from instascrape import Hashtag | |
#Substitute 'ad' with the word you | |
#want to search for (as a string) | |
hashtag = Hashtag('ad') | |
#Scrape the profile | |
hashtag.scrape() | |
#Get list of the recent posts | |
recents = hashtag.get_recent_posts() | |
#Build dataframe | |
data = pd.DataFrame([get_post_data(post) for post in recents]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment