Then if you want to work with the data in a notebook, exporting it to csv and reading it using pandas in a dataframe is probably the best option. The twarc2 docs should help with twarc2 specifics: twarc2 (en) - twarc There’s a good link to a tutorial for command line twarc use there - it takes you through twarc use for v1.1 but the part about the command line is more useful. It will be better to use twarc2 for data crawling: There are more tutorials here: Tutorials - twarc and a livestream recording here: TwitterDev: twarc2 and Academic Search - PeerTubeFR That twarc tutorial doesn’t use the academic access endpoint, but it’s good practice to get familiar with using tools to get data. I would begin here, to get the basics of setting up a command line utility up: Collect Twitter Data with Twarc! HTTPError: 403 Client Error: Forbidden for url: > 953 raise HTTPError(http_error_msg, response=self) ~/opt/anaconda3/lib/python3.9/site-packages/requests/models.py in raise_for_status(self) ~/opt/anaconda3/lib/python3.9/site-packages/twarc/decorators2.py in new_f(*args, **kwargs)ħ3 log.error("Unexpected HTTP response: %s", resp) ~/opt/anaconda3/lib/python3.9/site-packages/twarc/decorators2.py in new_f(self, *args, **kwargs)ġ09 # don't catch any HTTP errors since those are handled separatelyġ10 if isinstance(e, ):ġ02 while errors 104 resp = f(self, *args, **kwargs) ~/opt/anaconda3/lib/python3.9/site-packages/twarc/client2.py in get_paginated(self, *args, **kwargs) > 232 for response in self.get_paginated(url, params=params):Ģ34 # Calculate the amount of time to sleep, accounting for any ~/opt/anaconda3/lib/python3.9/site-packages/twarc/client2.py in _search(self, url, query, since_id, until_id, start_time, end_time, max_results, expansions, tweet_fields, user_fields, media_fields, poll_fields, place_fields, next_token, granularity, sleep_between) Reset your network devices to make sure your router hasnt become flooded. HTTPError Traceback (most recent call last) Also, before trying the steps below, exit the app and launch it again. Here are my error messages: Unexpected HTTP response: Is there a way I can test credentials and a simple call to the API without using twarc? thx I’m not familiar with twarc, and reading the documentation I’m pretty lost, and it feels a little daunting. When I then ran the rest of the code, I got a lot of errors (pasted below).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |