sverrirs / ruvsarpur

Python script to download shows off the Icelandic RÚV website.

Home Page:https://sverrirs.github.io/ruvsarpur/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Max retries exceeded with url & VOD question

arnib13 opened this issue · comments

Hello, I've been using your script for a while, usually just set it and forget it, brilliant.

I'm trying out the new version and I'm having difficulties.

Regarding the VOD, is it correct of me to assume that it should be able to fetch any item from the VOD? For example, should the script find all shows from here:

https://www.ruv.is/sjonvarp/spila/utras-i/31642/9dobt8

When I run the following command:

python3 ruvsarpur/src/ruvsarpur.py --list --find "Exit"

I get:

Found 2 show(s)
5168617: Útrás (4 af 8)
  30862: Sýnt 2021-03-29 22:20

5168616: Útrás (3 af 8)
  30862: Sýnt 2021-03-22 22:20

Regarding the other issue, I run the following command:

python3 ruvsarpur/src/ruvsarpur.py --ffmpeg /usr/bin/ffmpeg --refresh

Results in ( slightly edited )

Downloading VOD schedule | Total: 481 Series in tv
 Reading: |=========================| 100.0% Downloading VOD schedule | Total: 242 Series in krakkaruv
 Reading: |==-----------------------| 7.0% Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connection.py", line 170, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
    chunked=chunked,
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connection.py", line 182, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f219ac9d2b0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/user/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.ruv.is', port=443): Max retries exceeded with url: /gql/?operationName=getEpisode&variables=%7B%22programID%22:30708%7D&extensions=%7B%22persistedQuery%22:%7B%22version%22:1,%22sha256Hash%22:%22f3f9
57a3a577be001eccf93a76cf2ae1b6d10c95e67305c56e4273279115bb93%22%7D%7D (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f219ac9d2b0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

Could it be that RUV is limiting this script or the rate of queries is to fast?

Script is ran on Ubuntu 18.04

Best regards

Hi @arnib13

Thanks for the kind words and the bug report, sorry for the slow turn around on this.

Both of these issues should be solved in the latest patch release
https://github.com/sverrirs/ruvsarpur/releases/tag/v7.0.2