In the age of social media, it is all about getting more audience. One of the may ways of doing so is using hashtags. If you know what the top hashtags are, you can include them in your post and potentially get discovered by more audience who are looking at posts associated with those hashtags.
The outline:
Here, we will write code that takes some text input from the user, converts it to a hashtag and then retrieves top tweets with that hashtag from twitter. The code will then scrape the retrieved tweets for other hashtag and finally return a list of all the hashtags for the user to review/use.
Getting user input
We will ask the user for input and save it to a variable “tag” after converting it to string.
tag =str(input(“Please enter your hashtag/text: “))
Find Relevant Top Hashtags using Python - Part 2
#hashtag #python #web-scraping #twitter