I am trying to use twython package to scrap twitter data.
Due to the huge number of twitter handles that I am dealing with, I cannot use twitter.lookup_user(user_id=user_batch)
command - so I instead tried to use
user_dict_batch = tw.request(user_url, method='POST')
.
Now, according to the twython documentation, the function request
is defined as follows:
request(endpoint, method='GET', params=None, version='1.1')
Return dict of response received from Twitter’s API
Parameters:
endpoint (string) – (required) Full url or Twitter API endpoint (e.g. search/tweets)
method (string) – (optional) Method of accessing data, either GET or POST. (default GET)
params (dict or None) – (optional) Dict of parameters accepted by Twitter API endpoint
version (string) – (optional) Twitter API version to access (default 1.1)
Return type:
dict
my question is, what exactly is the "Twitter API endpoint"? For instance, if I am trying to scrap for information about the user whose twitter handle is 3Degrees_Inc
, what would be the Twitter API endpoint
for this specific user be? I tried to use 'https://twitter.com/3Degrees_Inc'
for my value for the parameter endpoint
, but it's keep throwing me the Twitter API 403 (forbidden) error
....
thanks,