{"id":16793019,"url":"https://github.com/hellowlol/nrk_api","last_synced_at":"2025-03-22T01:30:42.138Z","repository":{"id":54295824,"uuid":"46520732","full_name":"Hellowlol/nrk_api","owner":"Hellowlol","description":"API to interact with NRK, also includes a cli.","archived":false,"fork":false,"pushed_at":"2021-02-26T02:12:38.000Z","size":373,"stargazers_count":22,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T06:51:25.115Z","etag":null,"topics":["api-client","cli","download","nrk","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hellowlol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-19T21:13:10.000Z","updated_at":"2024-04-02T17:41:49.000Z","dependencies_parsed_at":"2022-08-13T11:20:10.024Z","dependency_job_id":null,"html_url":"https://github.com/Hellowlol/nrk_api","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellowlol%2Fnrk_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellowlol%2Fnrk_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellowlol%2Fnrk_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellowlol%2Fnrk_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hellowlol","download_url":"https://codeload.github.com/Hellowlol/nrk_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244893320,"owners_count":20527573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","cli","download","nrk","python"],"created_at":"2024-10-13T08:47:56.676Z","updated_at":"2025-03-22T01:30:41.759Z","avatar_url":"https://github.com/Hellowlol.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nrk_api\n[![Travis Status](https://travis-ci.org/Hellowlol/nrk_api.svg?branch=master)](https://travis-ci.org/Hellowlol/nrk_api)\n[![Cov](https://codecov.io/gh/hellowlol/nrk_api/branch/master/graph/badge.svg)](https://codecov.io/gh/hellowlol/nrk_api/branch/master)\n[![GitHub Releases](https://img.shields.io/github/tag/hellowlol/nrk_api.svg?label=github+release)](https://github.com/hellowlol/nrk_api/releases)\n[![PyPI version](https://badge.fury.io/py/nrk-api.svg)](https://pypi.python.org/pypi/nrk-api)\n\nAPI for NRK. (Norsk rikskringkasting) (Originally intended to support a CLI)\n\n## CLI Usage\nIn addition you will need [`ffmpeg`](https://ffmpeg.org/), e.g. `apt-get install ffmpeg` (Ubuntu), `brew install ffmpeg` (macOs)\n\n\n    usage: nrkdl [-h] [-s keyword] [-d] [-b] [-sub] [-dr] [-sp SAVE_PATH] [-u URL]\n             [-ea EXPIRES_AT]\n\n    CLI tool to download video from NRK.\n\n    optional arguments:\n      -h, --help            show this help message and exit\n\n      -s keyword, --search keyword\n                            Search nrk for a show and download files\n\n      -d, --description     Print verbose program description in console\n      -b, --browse          Builds a menu where you can choose popular categories\n      -sub, --subtitle      Download subtitle for this program too.\n      -dr, --dry_run        Dry run, dont download any files.\n      -sp SAVE_PATH, --save_path SAVE_PATH\n                        Set a save path\n      -u URL, --url URL     Use NRK URL as source. Comma separated e.g. \"url1, url2\"\n      -ea EXPIRES_AT, --expires_at EXPIRES_AT\n                        Get all files that looses access rights between two\n                        dates or a date\n\n\n## Search\n```\n\u003e nrkdl -s \"brannma\"\n  2: Brannmann i seks knop\n  1: Brannmann\n  0: Brannmann Sam\n\nSelect a number or use slice notation\n0\n\n  .....\n  .....\n  4: Brannmann Sam S03E29\n  3: Brannmann Sam S03E30\n  2: Brannmann Sam S03E32\n  1: Brannmann Sam S03E33\n  0: Brannmann Sam S05E25\n\nSelect a number or use slice notation\n::\n\nDownloads starting soon.. 23 downloads to go\n100%|############################################################################| 23/23 [03:57\u003c00:00, 79.09s/it]\n\n```\n\n## URL\n```\n\u003e nrkdl -u \"http://tv.nrksuper.no/serie/bernt-og-erling-paa-nye-eventyr http://tv.nrksuper.no/serie/bertine-paa-besoek\"\n100%|####################################################################################| 2/2 [00:21\u003c00:00, 13.63s/it]\n```\n\n## Module\n```\nnrk = NRK()\ns = await nrk.search(\"lille jack\", strict=True)[0]\nfor e in await s.episodes():\n    await e.download()\n\nall_downloads = nrk.downloads()\n\n# How many files are we gonna download\nprint(len(nrk.downloads()))\n# Start downloading\nawait all_downloads.start()\n\n```\nSee example and source file for more examples\n\n## Using Docker\n\nTo use `nrkdl` in a self-contained docker container, the provieded `Dockerfile` should get you going for a minimalistic install.\nIf you want to combine this into a standalone command, something like this will be what you want.\n```sh\n#!/bin/sh\n\n# export DATA=\"/mnt/multimedia/tmp\" # Set if you don't want downloads to go to your ${HOME}/downloads\ncd ${HOME}/Projects/programming/nrkdl  # Path where we can find a checkout of this repository\ndocker run -it -v ${DATA:-${HOME}/downloads}:/nrkdl/downloads $(docker build -q .) $*\n\n# Open data-path if we are on osx\n# [[ $? == 0 ]] \u0026\u0026 ( open ${DATA} )\n```\n\nYou can now run it using example `nrkdl -s \"brannma\"`.\n\n## Install\npip install nrk_api\n\n## Why should you use this library?\n- Easy to download entire shows\n- Browsing features\n- Fixes up tvshows fucked up naming so it can be parsed by kodi/plex/emby\n- Pretty fast, maxes my 500 mbit connection.\n\n## Similar tools\n- [If you need a gui](https://bitbucket.org/snippsat/wx_nrk \"snippsats wx_nrk\")\n- [Other cli tool](https://github.com/kvolden/nrk_download \"nrk_download\")\n- [nrk written in php](https://github.com/AndKe/nrk)\n- [nrk-tv-downloader written in bash](https://github.com/odinuge/nrk-tv-downloader)\n- [nrk-download cli tool](https://github.com/marhoy/nrk-download)\n- Use the search there is loads of nrk options.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellowlol%2Fnrk_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellowlol%2Fnrk_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellowlol%2Fnrk_api/lists"}