Ruvsarpur
Python script to download shows off the Icelandic RÚV website.
Install / Use
/learn @sverrirs/RuvsarpurREADME
RÚV Sarpur
[!NOTE] The previously bundled ffmpeg executable for windows was removed in version 14.2.0, you must now download it separately. See details in Requirements below...
ruvsarpur.py is a python script that allows you to list, search and download TV shows off the Icelandic RÚV Sarpurinn website. The script is operated solely through a windows or linux command prompt.
webvtttosrt.py is a python script that can convert webvtt and vtt files to the .srt subtitles format. (This format is used by the RÚV website for some episodes).
Project website at https://sverrirs.github.io/ruvsarpur/
If you are intending on using this tool outside of Iceland then I recommend a VPN connection. Its setup is discussed in more detail in a section near the end of this document
- RÚV Sarpur
- Demo
- Requirements
- Getting started
- Advanced uses
- Plex MediaServer Compatibility
- Frequently Asked Questions
- Using OpenVPN to automatically connect to a VPN if necessary
- webvtttosrt.py
Demo
<p align="center"> <img src="https://raw.githubusercontent.com/sverrirs/ruvsarpur/master/img/demo01.gif" alt="Usage Demo" title="Usage Demo"> </p>Requirements
Python version 3.9 or newer, running the latest version is highly recommended.
Before first use make sure you install all requirements using
pip install -r requirements.txt
If you run into trouble installing the python-levenstein package (it is optional) then check out this solution on StackOverflow http://stackoverflow.com/a/33163704
[!IMPORTANT]
This tool relies on the ffmpeg video processing kit. The previously bundled ffmpeg executable for windows was removed in version 14.2.0. You now must therefore download the binary executable of ffmpeg or https://www.gyan.dev/ffmpeg/builds/ that is appropriate for your operating system from the official website. Then either add the ffmpeg tool to your PATH environment variable or in abin/folder next to the script or alternatively specify its path explicitly using the--ffmpegcommand line parameter. This was necessary as the latest ffmpeg (v8.0) release is simply too big.
Getting started
After downloading the script can be run by typing in
python ruvsarpur.py --help
To list all available shows and their information use the --list switch. This switch can be used with any other argument to disable downloading and have the script only list matches.
python ruvsarpur.py --list
The script downloads the tv schedule for the last month (that is the default availability of shows on the RÚV website). By default the script will only refresh the schedule once per day. You can force it to re-download the tv schedule by using the --refresh switch
python ruvsarpur.py --list --refresh
The script stores, by default, all of its config files in the current user home directory in a folder named '.ruvsarpur'. Use the --portable command line option to make the script store all configuration files in the current working directory.
python ruvsarpur.py --portable --list
Incremental updates
The full refresh of the VOD catalog using the --refresh switch can be very time consuming. In cases where the script is run on a frequent intra-day schedule the --incremental switch can be added. When this switch is used the script attempts to perform a fast incremental intra-day refresh.
Setting this switch instructs the refresh mechanism to only download information for items that are new since the last full TV schedule refresh from the same day. If the current date when the refreh is run is newer than the latest refresh date stored then this option has no effect and a full refresh is always performed.
Finding shows by name
To find shows by title use the --find argument
python ruvsarpur.py --list --find "Hvolpa"
which returns
Found 3 shows
4852061: Hvolpasveitin (11 af 24)
21810: Sýnt 2016-09-26 18:01
4849078: Hvolpasveitin (20 af 26)
18457: Sýnt 2016-09-25 08:00
4852060: Hvolpasveitin (10 af 24)
21810: Sýnt 2016-09-19 18:01
The results are formatted in the following pattern
{pid} : {show title}
{sid} : {showtime}
You can include the optional --desc switch to display a short description of each program (if it is available)
python ruvsarpur.py --list --find "Hvolpa" --desc
Downloading shows
To download shows you can either use the sid (series id), the pid (program id) to select what to download. Alternatively it is also possible to use the --find switch directly but that may result in the script downloading additional material that may match your search string as well.
Using the --sid will download all available episodes in the series
python ruvsarpur.py --sid 18457
Using the --pid will only download a single episode
python ruvsarpur.py --pid 4849075
Both the --sid and --pid parameters support multiple ids
python ruvsarpur.py --sid 18457 21810
python ruvsarpur.py --pid 4849075 4852060 4849078
Use the -o or --output argument to control where the video files will be saved to. Please make sure that you don't end your path with a backwards slash.
python ruvsarpur.py --pid 4849075 -o "c:\videos\ruv"
The script keeps track of the shows that have already been downloaded. You can force it to re-download files by using the --force switch
python ruvsarpur.py --pid 4849075 --force
If recoding history has been lost, files copied between machines or they are incorrectly labelled as previously recorded there is a --checklocal switch available.
When this switch is specified the script will check to see if the video file exists on the user's machine before attempting a re-download. If it doesn't exist then it will start the download, if the file exists it will record it's pid as recorded and skip re-downloading it.
python ruvsarpur.py --pid 4849075 --checklocal
Choosing video quality
The script automatically attempts to download videos using the 'HD1080' video quality for all download streams, this is equivilent of Full-HD resolution or 3600kbps. This setting will give you the best possible offline viewing experience and the best video and audio quality when casting to modern TVs.
Note: If you're intending the video files to be exclusively used on mobile phones then using the 'Normal' quality or 1200kbps will in most cases be sufficient and save you a lot of space and bandwidth. Normal is equivilent of SD (standard-definition).
By using --quality you instruct the script to download either a higher or lower quality video.
python ruvsarpur.py --pid 4849075 --quality "HD720"
The available values are:
| Value | Description | kbps |
| ----- | ----- | ----- |
| "Normal" | Normal quality expected in a standard definition broadcast, works well on most devices. | 1200kbps |
| "HD720" | 720p good quality, intended for HD-ready devices | 2400kbps |
| "HD1080" | 1080p very good quality intended for newer devices marked as Full-HD resolution. This produces very big files. This is the default. | 3600kbps |
Advanced uses
Downloading shows that have english subtitles
Use --includeenglishsubs flag to have the script also download the version of series that have burn-in english subtitles. This setting is off by default.
Adding this flag will download both the normal icelandic version without subtitles and also the version with the burn-in subtitles. There is no option to only download the english burn in version only.
python ruvsarpur.py --find "Felix & Klara" --originaltitle --includeenglishsubs --list
returns
Found 2 show(s)
asl781: Felix & Klara (1 af 3)
36560: Sýnt 2025-10-05T20:20
bfb23h: Felix & Klara (with English subtitles) (1 af 3) - Felix & Klara
38519: Sýnt 2025-10-05T20:20
while the normal search
python ruvsarpur.py --find "Felix & Klara" --originaltitle --list
``
