ozencb / yts-scraper

Download .torrent files from YTS YIFY
MIT License
52 stars 22 forks source link

Encoding Issue #10

Open Arefu opened 4 years ago

Arefu commented 4 years ago

File "/usr/lib/python3.8/site-packages/urllib3/response.py", line 572, in stream for line in self.read_chunked(amt, decode_content=decode_content): File "/usr/lib/python3.8/site-packages/urllib3/response.py", line 793, in read_chunked self._original_response.close() File "/usr/lib/python3.8/contextlib.py", line 131, in exit self.gen.throw(type, value, traceback) File "/usr/lib/python3.8/site-packages/urllib3/response.py", line 455, in _error_catcher raise 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 "/usr/lib/python3.8/site-packages/YTS_Scraper-0.1.1-py3.8.egg/yts_scraper/main.py", line 153, in main scraper.download() File "/usr/lib/python3.8/site-packages/YTS_Scraper-0.1.1-py3.8.egg/yts_scraper/scraper.py", line 357, in download self.initialize_download() File "/usr/lib/python3.8/site-packages/YTS_Scraper-0.1.1-py3.8.egg/yts_scraper/scraper.py", line 202, in __initialize_download self.filter_torrents(movie) File "/usr/lib/python3.8/site-packages/YTS_Scraper-0.1.1-py3.8.egg/yts_scraper/scraper.py", line 256, in __filter_torrents bin_content_tor = (requests.get(torrent_url)).content File "/usr/lib/python3.8/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, kwargs) File "/usr/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 685, in send r.content File "/usr/lib/python3.8/site-packages/requests/models.py", line 829, in content self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b'' File "/usr/lib/python3.8/site-packages/requests/models.py", line 754, in generate raise ChunkedEncodingError(e) requests.exceptions.ChunkedEncoding

I doubt I lost internet like it claims, the computer running this is my DHCP / DNS server, I'd notice if it was out

ozencb commented 4 years ago

Hello.

The API might be down as well. I will add some error handling for this case too when I have time. A "retry every X seconds" type of thing should work fine for short outages

Arefu commented 4 years ago

Thank you muchly!

ItsPiyusha commented 3 years ago

ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

ItsPiyusha commented 3 years ago

This error occurs after downloading some files

Arefu commented 3 years ago

That's not a similar issue, afaik that would be you're being rate limited.

oks8 commented 3 years ago

Hello.

The API might be down as well. I will add some error handling for this case too when I have time. A "retry every X seconds" type of thing should work fine for short outages

Hi there,

I'm having the same error while downloading and it can't be completed. Any solution is much appreciated.

Thank you.