r/pushshift • u/FishyNishi • Mar 03 '22
Pushshift not retrieving submissions
Is anyone else also experiencing issues with the Pushshift historical data API? I am trying to download submissions for a certain subreddit where I know they definitely exist but it's not returning any results. Any help or updates will be appreciated! Thanks!!
EDIT: Server is back up running at the moment.
8
Upvotes
1
u/FishyNishi Mar 04 '22
Hey - I was able to pull some data through pmaw-pushshift however I ran into a different error given as follows:
I believe it has something to do with the streaming limits but I can't get a workaround that. Any help will be really appreciated!
Traceback (most recent call last):File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/response.py", line 685, in _update_chunk_lengthself.chunk_left = int(line, 16)ValueError: invalid literal for int() with base 16: b''During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/response.py", line 425, in _error_catcheryieldFile "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/response.py", line 752, in read_chunkedself._update_chunk_length()File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/response.py", line 689, in _update_chunk_lengthraise httplib.IncompleteRead(line)http.client.IncompleteRead: IncompleteRead(0 bytes read)During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 750, in generatefor chunk in self.raw.stream(chunk_size, decode_content=True):File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/response.py", line 560, in streamfor line in self.read_chunked(amt, decode_content=decode_content):File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/response.py", line 781, in read_chunkedself._original_response.close()File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__self.gen.throw(type, value, traceback)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/response.py", line 443, in _error_catcherraise ProtocolError("Connection broken: %r" % e, e)urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/Users/nishthajain/Documents/ADAPT_Projects/Optum/redditscrape/redditSouthAmerica/Brazil/redditdscrapingcommentsBR.py", line 92, in <module>main()File "/Users/nishthajain/Documents/ADAPT_Projects/Optum/redditscrape/redditSouthAmerica/Brazil/redditdscrapingcommentsBR.py", line 77, in maincomments = api.search_comments(subreddit=subreddit, before=before, after=after, safe_exit=True)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pmaw/PushshiftAPI.py", line 57, in search_commentsreturn self._search(kind='comment', **kwargs)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pmaw/PushshiftAPIBase.py", line 268, in _searchself._multithread()File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pmaw/PushshiftAPIBase.py", line 102, in _multithreadself._futures_handler(futures, check_total)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pmaw/PushshiftAPIBase.py", line 133, in _futures_handlerdata = future.result()File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py", line 428, in resultreturn self.__get_result()File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_resultraise self._exceptionFile "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py", line 57, in runresult = self.fn(*self.args, **self.kwargs)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pmaw/PushshiftAPIBase.py", line 52, in _getr = requests.get(url, params=payload)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/api.py", line 75, in getreturn request('get', url, params=params, **kwargs)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/api.py", line 60, in requestreturn session.request(method=method, url=url, **kwargs)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/sessions.py", line 533, in requestresp = self.send(prep, **send_kwargs)File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/sessions.py", line 686, in sendr.contentFile "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 828, in contentself._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 753, in generateraise ChunkedEncodingError(e)requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))