Skip to content

Commit

Permalink
Small fix for episode IDs in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
marhoy committed Mar 17, 2019
1 parent 960ef96 commit 9652bf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nrkdownload/parse_nrk_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
https://tv.nrk.no/serie/oppfinneren/MKTV52000418
https://tv.nrk.no/serie/forbrukerinspektoerene/MDHP11004318
https://tv.nrk.no/serie/forbrukerinspektoerene/MDHP11004318/24-10-2018
https://tv.nrk.no/serie/stroemmeland/2019/MUHH41000619
For a repeating TV-program
https://tv.nrk.no/serie/ut-i-naturen/DVNA50000512
Expand Down Expand Up @@ -66,7 +67,7 @@ def parse_url(url):
series_match = re.match(r"/serie/([\w-]+)", parsed_url.path)
season_match = re.match(r"/serie/[\w-]+/sesong/(\d+)", parsed_url.path)
episode_match = re.match(r"/serie/[\w-]+/sesong/\d+/episode/(\d+)", parsed_url.path)
episode_id_match = re.match(r"/serie/[\w-]+/(\w+)", parsed_url.path)
episode_id_match = re.match(r"/serie/.+([a-zA-Z]{4}[0-9]{8}).*", parsed_url.path)
program_match = re.match(r"/program/(\w+)", parsed_url.path)

podcast_match = re.match(r"/podkast/([\w_-]+)", parsed_url.path)
Expand Down

0 comments on commit 9652bf7

Please sign in to comment.