Laharah / redlist

Convert Spotify playlists to local m3u's and fill the gaps!
33 stars 5 forks source link

Only downloads 10 torrents at once #2

Closed BoBeR182 closed 4 years ago

BoBeR182 commented 4 years ago

Seems that RED blocks the 10th torrent request.

ERROR:redlist.redapi:<CIMultiDictProxy('Server': 'nginx', 'Date': 'Sun, 05 Apr 2020 02:02:14 GMT', 'Content-Type': 'text/html; charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Frame-Options': 'DENY', 'Content-Encoding': 'gzip', 'Strict-Transport-Security': 'max-age=31536000', 'X-Frame-Options': 'DENY')>
ERROR:redlist.__main__:Error Processing https://open.spotify.com/playlist/XXXXXXXXXXXXXXXXXXXXXXX.
Traceback (most recent call last):
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/__main__.py", line 220, in entry_point
    results.append(loop.run_until_complete(main(splist, options.yes)))
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/__main__.py", line 135, in main
    await asyncio.gather(*dls)
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/__main__.py", line 127, in add_torrent
    filename, data = await api.get_torrent(
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/redapi.py", line 135, in get_torrent
    raise ValueError("Wrong content-type: {}".format(
ValueError: Wrong content-type: text/html; charset=UTF-8
Laharah commented 4 years ago

I can't duplicate this on my end. May have been a hicup on red's side. If you re-run do you run into issues at the same spot?

BoBeR182 commented 4 years ago

Working now. Closing as "INVALID"

BoBeR182 commented 4 years ago

Crashed with another error, not sure if on RED's end or the scripts.

Traceback (most recent call last):
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/__main__.py", line 233, in entry_point
    results.append(loop.run_until_complete(main(splist, options.yes)))
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/__main__.py", line 148, in main
    await asyncio.gather(*dls)
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/__main__.py", line 140, in add_torrent
    filename, data = await api.get_torrent(
  File "/home/bober/redlist/lib/python3.8/site-packages/redlist/redapi.py", line 139, in get_torrent
    return filename, await response.content.read()
  File "/home/bober/redlist/lib/python3.8/site-packages/aiohttp/streams.py", line 358, in read
    block = await self.readany()
  File "/home/bober/redlist/lib/python3.8/site-packages/aiohttp/streams.py", line 380, in readany
    await self._wait('readany')
  File "/home/bober/redlist/lib/python3.8/site-packages/aiohttp/streams.py", line 296, in _wait
    await waiter
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed

It got about 32 torrents in out of 46 expected to download.

Laharah commented 4 years ago

That error makes it look like a connection error of some kind. If it keeps failing at the same point you'll have to get me more info so I can look deeper at the specific torrent it fails at.

Edit: You can post a message to me through https://keybase.io/laharah. If you don't have keybase just encrypt it https://keybase.io/encrypt#laharah and post it here as a reply.

BoBeR182 commented 4 years ago

Rerunning it solved the issue.