![]() Now we need to access our API keys from config object. We will be using Tweepy library to extract data from twitter. This is important as we do not want to expose our keys to others. This will create an object(config) and read the keys securely. To access the keys use ConfigParser: import configparser config = configparser.RawConfigParser() config.read(filenames = '/path/twitter.txt') Now that you have API Key, SecretAPIkey, Accesstoken and secret access token save them in a text file to access them securely. Twitter has user-friendly API ‘s to easily access publically available data. This tutorial will show how to scrape tweets related to COVID 19 from twitter using twitter API’s. In this tutorial we will use those keys to scrape tweets from twitter. In one of our previous tutorials we learnt how to create twitter API keys. It is very easy to scrape tweets from Twitter API keys. Twitter is a great source to get publicaly available realtime data on most trending topics in the world and also the user data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |