From e4faca90125862819d4b52171037abc776857095 Mon Sep 17 00:00:00 2001 From: Axel Schneider Date: Tue, 17 Aug 2021 14:15:41 +0200 Subject: [PATCH] Update German TV (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update germany.md adding some channels * Update germany.md * Update germany.md One aktualisiert, RBB hinzugefügt. * Update germany.md * Update make_playlist.py using f-strings * Update germany.md Co-authored-by: Free TV <82442641+freetv332@users.noreply.github.com> --- germany.md | 15 +++------------ make_playlist.py | 8 +++----- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/germany.md b/germany.md index af285ea..0d289b6 100644 --- a/germany.md +++ b/germany.md @@ -11,7 +11,7 @@ https://wiki.ubuntuusers.de/Internet-TV/Stationen | 2 | ZDF Ⓖ | [>](http://zdf-hls-15.akamaized.net/hls/live/2016498/de/veryhigh/master.m3u8) | | | 3 | 3sat Ⓖ | [>](https://zdf-hls-18.akamaized.net/hls/live/2016501/dach/veryhigh/master.m3u8) | | | 4 | ARTE Ⓖ | [>](https://artelive-lh.akamaihd.net/i/artelive_de@393591/index_1_av-p.m3u8) | | -| 5 | ONE Ⓖ | [>](https://onelivestream-lh.akamaihd.net/i/one_livestream@568814/index_4_av-p.m3u8) | | +| 5 | ONE Ⓖ | [>](https://mcdn.one.ard.de/ardone/hls/master.m3u8) | | | 6 | ZDFinfo Ⓖ | [>](https://zdf-hls-17.akamaized.net/hls/live/2016500/de/veryhigh/master.m3u8) | | | 7 | ZDFneo Ⓖ | [>](https://zdf-hls-16.akamaized.net/hls/live/2016499/de/veryhigh/master.m3u8) | | | 8 | MDR Sachsen-Anhalt Ⓖ | [>](https://mdrtvsahls.akamaized.net/hls/live/2016879/mdrtvsa/master.m3u8) | | @@ -28,14 +28,5 @@ https://wiki.ubuntuusers.de/Internet-TV/Stationen | 19 | Tagesschau24 Ⓖ | [>](http://tagesschau-lh.akamaihd.net/i/tagesschau_1@119231/master.m3u8) | | | 20 | ARD Alpha Ⓖ | [>](http://brlive-lh.akamaihd.net/i/bralpha_germany@119899/master.m3u8) | | | 21 | DW Ⓖ | [>](http://dwstream6-lh.akamaihd.net/i/dwstream6_live@123962/master.m3u8) | | - -

DVB-S

- -| # | Channel | Link | Logo | -|:---:|:--------------:|:-----:|:-----: -| 1 | DW Ⓢ | [>](https://dwstream6-lh.akamaihd.net/i/dwstream6_live@123962/index_1_av-b.m3u8) | | - -

Invalid

- -| # | Channel | Link | Logo | -|:---:|:--------------:|:-----:|:-----: +| 22 | RBB Berlin Ⓖ | [>](https://rbb-hls-berlin.akamaized.net/hls/live/2017824/rbb_berlin/master.m3u8) | | +| 23 | RBB Brandenburg Ⓖ | [>](https://rbb-hls-brandenburg.akamaized.net/hls/live/2017825/rbb_brandenburg/master.m3u8) | | diff --git a/make_playlist.py b/make_playlist.py index bde2bd5..cac4342 100755 --- a/make_playlist.py +++ b/make_playlist.py @@ -17,9 +17,7 @@ class Channel(): self.logo = self.logo[self.logo.find('src="')+5:self.logo.rfind('"')] def to_m3u_line(self): - return('#EXTINF:-1 tvg-name="%(name)s" tvg-logo="%(logo)s" group-title="%(group)s",%(name)s\n%(url)s' \ - % {'name':self.name, 'logo':self.logo, 'group':self.group, 'url':self.url}) - + return (f'#EXTINF:-1 tvg-name="{self.name}" tvg-logo="{self.logo}" group-title="{self.group}",{self.name}\n{self.url}') if __name__ == "__main__": with open("playlist.m3u8", "w", encoding='utf-8') as playlist: @@ -29,7 +27,7 @@ if __name__ == "__main__": continue with open(filename, encoding='utf-8') as markup_file: group = filename.replace(".md", "").title() - print("Generating %s" % group) + print(f"Generating {group}") for line in markup_file: if "

" in line.lower() and "

" in line.lower(): group = re.sub('<[^<>]+>', '', line.strip()) @@ -37,4 +35,4 @@ if __name__ == "__main__": continue channel = Channel(group, line) print(channel.to_m3u_line(), file=playlist) - +