Giter Site home page Giter Site logo

marhoy / nrk-download Goto Github PK

View Code? Open in Web Editor NEW
54.0 6.0 9.0 598 KB

Download content from NRK, complete with images and subtitles:

Home Page: https://nrkdownload.readthedocs.org

License: GNU General Public License v3.0

Python 100.00%
nrk series episodes subtitles video-downloader

nrk-download's Introduction

nrkdownload

"Latest version"

"Supported Python versions"

This is a commandline tool to download programs and series from NRK (Norwegian public broadcaster). It supports both TV, Radio and Podcast content. The tool is written in Python, and is compatible with Python 3.8 or newer. It has been tested under Linux, Mac OS X and Windows.

Documentation

The documentation for nrkdownload is availabe here: https://nrkdownload.readthedocs.org

Setting up a development environment

Install poetry, and a recent Python version (>=3.7). If you want to run tests with multiple Python versions, install pyenv. Set up the development environment:

poetry install

Making a new release

  • Make sure all tests are ok by running tox
  • Make a pull requst on GitHub
  • Use the "new release" functionallity of GitHub. Make a new tag.
  • Update pyproject.toml to match the new version number.
  • poetry build
  • poetry publish

nrk-download's People

Contributors

dependabot[bot] avatar marhoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nrk-download's Issues

Unable to download series with "?" in title.

Describe the bug
Fails to download titles with "?" in title on Windows 10.

To Reproduce
Steps to reproduce the behavior:

  1. nrkdownload.exe -d D:\temp\ https://tv.nrk.no/serie/skal-vi-lekee

Expected behavior
Download as normal.

Error

PS C:\Users\default> nrkdownload.exe -d D:\temp\ https://tv.nrk.no/serie/skal-vi-lekee
Downloading Skal vi leke?
Downloading Sesong 1
  [------------------------------------]    0%
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\users\default\.local\bin\nrkdownload.exe\__main__.py", line 7, in <module>
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\typer\main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\typer\main.py", line 532, in wrapper
    return callback(**use_params)  # type: ignore
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\nrkdownload\cli.py", line 89, in main
    download_series(download_dir, series_id, season_id, episode_id)
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\nrkdownload\download.py", line 73, in download_series
    program.download_as_episode(series.title, sequence_string, directory)
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\nrkdownload\nrk_tv.py", line 97, in download_as_episode
    download_image_url(self.image_url, Path(f"{filename}.jpg"))
  File "C:\Users\default\.local\pipx\venvs\nrkdownload\lib\site-packages\nrkdownload\nrk_tv.py", line 36, in download_image_url
    with open(filename, "wb") as file:
OSError: [Errno 22] Invalid argument: 'D:\\temp\\Skal vi leke\\Season 01\\Skal vi leke? - s01e01 - 1. Hund.jpg'

Desktop (please complete the following information):

  • OS: Windows 10 21H2
  • Python 3.10.5
  • Installed nrk-download via pipx

Problem while executing over ssh?

Hi,

first of, love the app/initative! 🎉

When I execute the program directly from my server, it works great. But when I try to execute some commands over ssh, it crashes. Not sure if this is a problem with the application itself, or with my ssh setup somehow. But everything else I do over ssh works fine. This is the error message I get over ssh:

mini:~ eivindml$ nrkdownload -s "kampen om livet"

Matching series:
 0: Ganefryd : 1 Sesong(er)
 1: Kampen om livet : 1 Sesong(er)

Enter a number in the range 0-1. (q to quit): 1
1

Matching programs
 0: Kampen om livet (Sesong 1): Er vi alene i Universet? - 1:8 - S01E01
 1: Kampen om livet (Sesong 1): Kan vi leve evig? - 2:8 - S01E02
 2: Kampen om livet (Sesong 1): Kan vi utrydde sult? - 3:8 - S01E03
 3: Kampen om livet (Sesong 1): Kan vi kurere kreft? - 4:8 - S01E04
Traceback (most recent call last):
  File "/usr/local/bin/nrkdownload", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/nrkdownload/commandline_script.py", line 31, in main
    nrkdownload.search_from_cmdline(arguments)
  File "/Library/Python/2.7/site-packages/nrkdownload/nrktv.py", line 360, in search_from_cmdline
    series_download(series[index])
  File "/Library/Python/2.7/site-packages/nrkdownload/nrktv.py", line 346, in series_download
    ask_for_program_download(programs)
  File "/Library/Python/2.7/site-packages/nrkdownload/nrktv.py", line 219, in ask_for_program_download
    print('{:2}: {}'.format(i, p))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 48: ordinal not in range(128)

Any ideas?

Stuck at image download

Describe the bug
When I launch the download for an episode, it appears like it can't go past to the step "Downloading image for xxx"

To Reproduce

  1. nrkdownload [insert link to season or episode]
  2. choose episode, or list of episodes.

Expected behavior
Nothing goes past beyond that point. Download should happen.

Screenshots
screenshot 1 - Verbose mode
Screenshot 1

screenshot 2 - feedback when I quit (ctrl+c)
Screenshot 2

Desktop (please complete the following information):

  • OS: Mac OSX 10.15.7 (19H1217)
  • Nrkdownload Version 2.1.2, running under Darwin with Python 3.9.5

Additional context
Happy to provide more information if needed.
I'm using a VPN to have access to nrk - as I live abroad. The episodes are accessible through firefox with no problem.

Grabbing episode or program description only

Could you add a command line argument to grab and print a list of the program/episode descriptions to a file or simply to the terminal, when listing all episodes found for a given program/series?

For example:

<p class="sup-mtl sup-mvm programinfo-panel-description">Tenk at noen sover i trærne. Hele vinteren. Men de er så små at det er vanskelig å få øye på dem.
I dag skal Finn Arve prøve å lokke fram de som bor i trærne.</p>

from https://nrksuper.no/serie/ugler-i-mosen/PRTR63000205/sesong-1/episode-2

two-hour time limit per video

Tusen takk to marhoy for this fantastic tool!

When downloading long programs (for example, the second segment of "Hurtigruten minutt for minutt"), I find that the video stream stops at the two-hour time mark. This is not caused by your code, but appears to be an issue with the akamai streaming.

My test: If I give the ffmpeg command manually in my Linux command window, and specify a start time of 1h59m, the stream still stops at 02h00m.
% ffmpeg -loglevel 8 -stats -t 00:05:00 -ss 01:59:00 -i http://nordond4b-f.akamaihd.net/i/wo/open/f4/f4dc5a04a7ca5c406f5cc313d4bed5d0d87004a0/a5084291-fb0c-4a48-ba2d-6ea4f834bab7_,141,316,563,1266,2250,.mp4.csmil/master.m3u8 -c:v copy -c:a copy -bsf:a aac_adtstoasc "/mydisk/nrkdownload/Hurtigruten minutt for minutt/Season 01- 2011/Hurtigruten minutt for minutt - S01E02 - Bergen - Florø - 23.12.2011.m4v"

Are you aware of any workaround for this behavior? Again, thanks.

Some series report as "Not available for download" even if they work in browser

Using current version (2.1.2), using Python 3.8.3, via VPN to Oslo.

Example URLs not working:
"https://tv.nrk.no/serie/klassen/sesong/1"
"https://tv.nrk.no/serie/exit/sesong/1/"

While these work
"https://tv.nrk.no/serie/newton/2021"
"https://tv.nrk.no/serie/superkrim/sesong/10"

Note that all links work in the browser with VPN on, just not through the nrk-downloader script.
Any idea what to look for in the code to get a clue as to what's going on?

Some logging issue with double -v:

[DEBUG] nrkdownload.nrkapi(104): Getting json-data on series exit
--- Logging error ---
Traceback (most recent call last):
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 1081, in emit
    msg = self.format(record)
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 925, in format
    return fmt.format(record)
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 664, in format
    record.message = record.getMessage()
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 369, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
  File "c:\programdata\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\programdata\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\Scripts\nrkdownload.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\commandline_script.py", line 105, in main
    download_url(url, download_all=arguments.all, download_last=arguments.last)
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\commandline_script.py", line 121, in download_url
    programs = parse_nrk_url.parse_url(url)
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\parse_nrk_url.py", line 108, in parse_url
    series = tv.series_from_series_id(series_id)
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\tv.py", line 330, in series_from_series_id
    seasons[season_id] = Season(
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\tv.py", line 182, in __init__
    LOG.debug("Creating new season of %s: %s: %s: %s", series_id, season_id, name)
Message: 'Creating new season of %s: %s: %s: %s'
Arguments: ('exit', '1', '1')
--- Logging error ---
Traceback (most recent call last):
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 1081, in emit
    msg = self.format(record)
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 925, in format
    return fmt.format(record)
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 664, in format
    record.message = record.getMessage()
  File "c:\programdata\anaconda3\lib\logging\__init__.py", line 369, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
  File "c:\programdata\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\programdata\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\Scripts\nrkdownload.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\commandline_script.py", line 105, in main
    download_url(url, download_all=arguments.all, download_last=arguments.last)
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\commandline_script.py", line 121, in download_url
    programs = parse_nrk_url.parse_url(url)
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\parse_nrk_url.py", line 108, in parse_url
    series = tv.series_from_series_id(series_id)
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\tv.py", line 330, in series_from_series_id
    seasons[season_id] = Season(
  File "c:\programdata\anaconda3\lib\site-packages\nrkdownload\tv.py", line 182, in __init__
    LOG.debug("Creating new season of %s: %s: %s: %s", series_id, season_id, name)
Message: 'Creating new season of %s: %s: %s: %s'
Arguments: ('exit', '2', '2')

KeyError: 'titles'

λ nrkdownload.exe https://radio.nrk.no/podkast/radioresepsjonen/
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Python38\Scripts\nrkdownload.exe_main
.py", line 7, in
File "c:\python38\lib\site-packages\nrkdownload\commandline_script.py", line 105, in main
download_url(url, download_all=arguments.all, download_last=arguments.last)
File "c:\python38\lib\site-packages\nrkdownload\commandline_script.py", line 121, in download_url
programs = parse_nrk_url.parse_url(url)
File "c:\python38\lib\site-packages\nrkdownload\parse_nrk_url.py", line 146, in parse_url
podcast = radio.podcast_from_podcast_id(podcast_id)
File "c:\python38\lib\site-packages\nrkdownload\radio.py", line 95, in podcast_from_podcast_id
title = json["titles"]["title"].strip()
KeyError: 'titles'

Only first part of program gets downloaded

It seems like some NRK programs consist of several video files. In these cases only the first video file gets downloaded.

To reproduce the issue:

  1. Open https://tv.nrk.no/serie/sjakk/MSPO46500113/09-11-2013#t=1t46m45s and play the program. Notice the transition at 01:46:50. This indicates that two separate video files are merged here. Also notice that the length of the program is 02:21:35.

  2. Run the command nrkdownload -u https://tv.nrk.no/serie/sjakk/MSPO46500113/09-11-2013 to download the TV program.

  3. Open the downloaded video file and notice that the length is 01:46:50, when it should be 02:21:35.

I have tested several other tools to download programs from NRK, and they all have the same problem.

(Note: This particular TV program was not a special case. Many programs seems to be merged by several video files, especially programs that had a break or switched between NRK1 and NRK2 when they aired. This includes many sports events and long running programs like "Hurtigruten minutt for minutt".)

404 Not Found for URL

Hello! When using the following command I get an error from your program:
nrkdownload https://tv.nrk.no/serie/melodi-grand-prix-tv/2019/MUHU07000019

Error:

Traceback (most recent call last):
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Cosmin\AppData\Local\Programs\Python\Python37\Scripts\nrkdownload.exe\__main__.py", line 9, in <module>
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\site-packages\nrkdownload\commandline_script.py", line 80, in main
    download_url(url, download_all=arguments.all, download_last=arguments.last)
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\site-packages\nrkdownload\commandline_script.py", line 95, in download_url
    programs = parse_nrk_url.parse_url(url)
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\site-packages\nrkdownload\parse_nrk_url.py", line 79, in parse_url
    episode = tv.new_program_from_mediaelement_id(media_id)
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\site-packages\nrkdownload\tv.py", line 227, in new_program_from_mediaelement_id
    json = nrkapi.get_mediaelement(mediaelement_id)
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\site-packages\nrkdownload\nrkapi.py", line 60, in get_mediaelement
    r.raise_for_status()
  File "c:\users\cosmin\appdata\local\programs\python\python37\lib\site-packages\requests\models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://psapi-granitt-prod-we.cloudapp.net/mediaelement/2019

403 Client Error: Site Disabled for url

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

run nrkdownload https://tv.nrk.no/serie/newton

Expected behavior
A clear and concise description of what you expected to happen.

Series starts downloading

Observed behaviour

Traceback (most recent call last): File "c:\users\danielv\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\danielv\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\danielv\AppData\Roaming\Python\Python38\Scripts\nrkdownload.exe\__main__.py", line 9, in <module> File "C:\Users\danielv\AppData\Roaming\Python\Python38\site-packages\nrkdownload\commandline_script.py", line 80, in main download_url(url, download_all=arguments.all, download_last=arguments.last) File "C:\Users\danielv\AppData\Roaming\Python\Python38\site-packages\nrkdownload\commandline_script.py", line 95, in download_url programs = parse_nrk_url.parse_url(url) File "C:\Users\danielv\AppData\Roaming\Python\Python38\site-packages\nrkdownload\parse_nrk_url.py", line 113, in parse_url series = tv.series_from_series_id(series_id) File "C:\Users\danielv\AppData\Roaming\Python\Python38\site-packages\nrkdownload\tv.py", line 281, in series_from_series_id json = nrkapi.get_series(series_id) File "C:\Users\danielv\AppData\Roaming\Python\Python38\site-packages\nrkdownload\nrkapi.py", line 94, in get_series r.raise_for_status() File "C:\Users\danielv\AppData\Roaming\Python\Python38\site-packages\requests\models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Site Disabled for url: http://psapi3-webapp-prod-we.azurewebsites.net/series/newton

Desktop (please complete the following information):

  • OS: windows 10
  • Version 2.0.3

Additional context
Add any other context about the problem here.

Unable to download series: 412 Client Error

$ nrkdownload -s fantorangen
ERROR: Not able to parse search-results: 412 Client Error: Precondition Failed for url: https://tvapi.nrk.no/v1/search/fantorangen
Traceback (most recent call last):
  File "/home/foo/.local/bin/nrkdownload", line 11, in <module>
    load_entry_point('nrkdownload==0.10.dev1+g4be2cc0', 'console_scripts', 'nrkdownload')()
  File "build/bdist.linux-x86_64/egg/nrkdownload/commandline_script.py", line 40, in main
  File "build/bdist.linux-x86_64/egg/nrkdownload/nrktv.py", line 356, in search_from_cmdline
TypeError: object of type 'NoneType' has no len()

Download only subtitles

Could you please add an option to download only subtitles? My usecase is that I'd like to translate/study subtitles of a whole series of several seasons to learn new words, etc.

NRK Radio broken for me

Describe the bug

When trying to download a episode of old "Stompa" show nrkdownload gives stacktrace.

To Reproduce
Steps to reproduce the behavior:

$ nrkdownload -d . https://radio.nrk.no/serie/stompa/MKTT60001160/27-08-1960
Traceback (most recent call last):
  File "/usr/local/bin/nrkdownload", line 11, in <module>
    sys.exit(main())
  File "/home/janl/.local/lib/python3.6/site-packages/nrkdownload/commandline_script.py", line 105, in main
    download_url(url, download_all=arguments.all, download_last=arguments.last)
  File "/home/janl/.local/lib/python3.6/site-packages/nrkdownload/commandline_script.py", line 121, in download_url
    programs = parse_nrk_url.parse_url(url)
  File "/home/janl/.local/lib/python3.6/site-packages/nrkdownload/parse_nrk_url.py", line 80, in parse_url
    episode = tv.new_program_from_mediaelement_id(media_id)
  File "/home/janl/.local/lib/python3.6/site-packages/nrkdownload/tv.py", line 298, in new_program_from_mediaelement_id
    episode_title=episode_title,
  File "/home/janl/.local/lib/python3.6/site-packages/nrkdownload/tv.py", line 69, in __init__
    self._series = series_from_series_id(self.series_id)
  File "/home/janl/.local/lib/python3.6/site-packages/nrkdownload/tv.py", line 310, in series_from_series_id
    json = nrkapi.get_series(series_id)
  File "/home/janl/.local/lib/python3.6/site-packages/nrkdownload/nrkapi.py", line 106, in get_series
    r.raise_for_status()
  File "/home/janl/.local/lib/python3.6/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://psapi.nrk.no/tv/catalog/series/stompa

$ host psapi.nrk.no
psapi.nrk.no is an alias for psapi3-prod.trafficmanager.net.
psapi3-prod.trafficmanager.net is an alias for gateway-prod-we1.westeurope.cloudapp.azure.com.
gateway-prod-we1.westeurope.cloudapp.azure.com has address 13.81.172.33

The psapi.nrk.no URL gives a 404.

Expected behavior
No exceptions thrown

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux
  • Ubuntu 18.04.4 LTS

Additional context

  • Version nrkdownload version 2.1.2, running under Linux with Python 3.6.9
  • Works on TV shows

Cannot download news

Has their API changed? Or they moved somewhere else?

$ nrkdownload -d . 'https://tv.nrk.no/serie/distriktsnyheter-nordland/202203/DKNO98031522/avspiller'
Traceback (most recent call last):
  File "/home/bz/.local/bin/nrkdownload", line 8, in <module>
    sys.exit(main())
  File "/home/bz/.local/lib/python3.10/site-packages/nrkdownload/commandline_script.py", line 105, in main
    download_url(url, download_all=arguments.all, download_last=arguments.last)
  File "/home/bz/.local/lib/python3.10/site-packages/nrkdownload/commandline_script.py", line 121, in download_url
    programs = parse_nrk_url.parse_url(url)
  File "/home/bz/.local/lib/python3.10/site-packages/nrkdownload/parse_nrk_url.py", line 80, in parse_url
    episode = tv.new_program_from_mediaelement_id(media_id)
  File "/home/bz/.local/lib/python3.10/site-packages/nrkdownload/tv.py", line 273, in new_program_from_mediaelement_id
    json = nrkapi.get_mediaelement(mediaelement_id)
  File "/home/bz/.local/lib/python3.10/site-packages/nrkdownload/nrkapi.py", line 71, in get_mediaelement
    r.raise_for_status()
  File "/home/bz/.local/lib/python3.10/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 410 Client Error: Gone for url: http://psapi-granitt-prod-we.cloudapp.net/mediaelement/DKNO98031522

nrk-download + flexget for auto-download?

I currently use flexget for automatic downloading of TV shows (which then is added to Plex ✌🏻). Do you/anyone know how to integrate nrk-download with flexget?

So that I can just add shows I want to watch in flexget's config.yml file, and it then executes nrkdownload app when new episodes are available?

As of now I can't see a way to do it, because it requires user input when executed. Would be great to add capabilities so that this is possible.

Flexget has an exec plugin which will allow to run commands with parameters from flexget, and fork a new background process (so that lage downloads doesn't halt the flexget process).

Programmes won't download

If I try nrkdownload -s skam

I can list the series, choose one and get the list of programmes available. If I pick one, it takes about two minutes and then reports:

Enter a number or interval (e.g. 8 or 5-10). (q to quit): 33
Getting program details for your selection of 1 programs...
Ready to download 0 programs, with total duration 0:00:00
Downloading: 0.00s [00:00, ?s/s]

And returns to the command line prompt immediately.

List index out of range

Describe the bug
Unable to download recent seasons of Mesternes Mester

To Reproduce
Steps to reproduce the behavior:

  1. Run
    nrkdownload -d . -a https://tv.nrk.no/serie/mesternes-mester/sesong/10/episode/1/avspiller

  2. See error
    Traceback (most recent call last): File "/home/danielv/.local/bin/nrkdownload", line 11, in <module> sys.exit(main()) File "/home/danielv/.local/lib/python2.7/site-packages/nrkdownload/commandline_script.py", line 80, in main download_url(url, download_all=arguments.all, download_last=arguments.last) File "/home/danielv/.local/lib/python2.7/site-packages/nrkdownload/commandline_script.py", line 95, in download_url programs = parse_nrk_url.parse_url(url) File "/home/danielv/.local/lib/python2.7/site-packages/nrkdownload/parse_nrk_url.py", line 92, in parse_url episode = series.seasons[season_number - 1].episodes[episode_number - 1] IndexError: list index out of range
    Expected behavior
    Episode starts downloading

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04

This issue happens for anything past halfway through season 4 for this show.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.