Open Myskovgaard opened 5 years ago
If you are using tweepy you have to create your own log. If you want to use the connector you need to create your own queries. e.g.:
# import authorization package
from requests_oauthlib import OAuth1
import pickle consumer_key, consumer_secret, oauth_token, oauth_token_secret = pickle.load(open('/path/to/twitter_credentials.pkl','rb'))
auth = OAuth1(consumer_key, consumer_secret, oauth_token, oauth_token_secret)
url ='https://api.twitter.com/1.1/search/tweets.json?q=foucault&geocode=55.676098,12.568337,5km'
name = 'realdonaldtrump' q = 'https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=realdonaldtrump&count=200&tweet_mode=extended'
call = {'url':q,'auth':auth} # define arguments to the requests.get method response,call_id = connector.get({'url':q,'auth':auth},'twittertest_auth') data = response.json()
2. I will create a little post about how you should analyze the Log later today.
The pip package is not updated yet, so until then you should use the following Connector: https://github.com/snorreralund/scraping_seminar/blob/master/logging_requests.py
see issue #41
Hi Everybody,
We have two questions in regards to Snorre's datalog file:
tweepy
function:Maybe you can give us an idea of how to implement it correctly?
Kindest regards, Group 10