Update German TV (#76)

* 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>
pull/82/head
Axel Schneider 2021-08-17 14:15:41 +02:00 committed by GitHub
parent 4af122c926
commit e4faca9012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 17 deletions

View File

@ -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) | <img height="20" src="https://i.imgur.com/JosNLQ0.png"/> |
| 3 | 3sat Ⓖ | [>](https://zdf-hls-18.akamaized.net/hls/live/2016501/dach/veryhigh/master.m3u8) | <img height="20" src="https://i.imgur.com/2r7GK0L.png"/> |
| 4 | ARTE Ⓖ | [>](https://artelive-lh.akamaihd.net/i/artelive_de@393591/index_1_av-p.m3u8) | <img height="20" src="https://i.imgur.com/fojjpeg.png"/> |
| 5 | ONE Ⓖ | [>](https://onelivestream-lh.akamaihd.net/i/one_livestream@568814/index_4_av-p.m3u8) | <img height="20" src="https://i.imgur.com/zu5gaQU.png"/> |
| 5 | ONE Ⓖ | [>](https://mcdn.one.ard.de/ardone/hls/master.m3u8) | <img height="20" src="https://i.imgur.com/zu5gaQU.png"/> |
| 6 | ZDFinfo Ⓖ | [>](https://zdf-hls-17.akamaized.net/hls/live/2016500/de/veryhigh/master.m3u8) | <img height="20" src="https://i.imgur.com/0jcN11J.png"/> |
| 7 | ZDFneo Ⓖ | [>](https://zdf-hls-16.akamaized.net/hls/live/2016499/de/veryhigh/master.m3u8) | <img height="20" src="https://i.imgur.com/XMPIWeS.png"/> |
| 8 | MDR Sachsen-Anhalt Ⓖ | [>](https://mdrtvsahls.akamaized.net/hls/live/2016879/mdrtvsa/master.m3u8) | <img height="20" src="https://raw.githubusercontent.com/cytec/tvlogos/master/mdr.png"/> |
@ -28,14 +28,5 @@ https://wiki.ubuntuusers.de/Internet-TV/Stationen
| 19 | Tagesschau24 Ⓖ | [>](http://tagesschau-lh.akamaihd.net/i/tagesschau_1@119231/master.m3u8) | <img height="20" src="https://raw.githubusercontent.com/cytec/tvlogos/master/tagesschau24.png"/> |
| 20 | ARD Alpha Ⓖ | [>](http://brlive-lh.akamaihd.net/i/bralpha_germany@119899/master.m3u8) | <img height="20" src="https://raw.githubusercontent.com/cytec/tvlogos/master/br-alpha.png"/> |
| 21 | DW Ⓖ | [>](http://dwstream6-lh.akamaihd.net/i/dwstream6_live@123962/master.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Deutsche_Welle_Logo.svg/320px-Deutsche_Welle_Logo.svg.png"/> |
<h2>DVB-S</h2>
| # | Channel | Link | Logo |
|:---:|:--------------:|:-----:|:-----:
| 1 | DW Ⓢ | [>](https://dwstream6-lh.akamaihd.net/i/dwstream6_live@123962/index_1_av-b.m3u8) | <img height="20" src="https://i.imgur.com/A1xzjOI.png"/> |
<h2>Invalid</h2>
| # | Channel | Link | Logo |
|:---:|:--------------:|:-----:|:-----:
| 22 | RBB Berlin Ⓖ | [>](https://rbb-hls-berlin.akamaized.net/hls/live/2017824/rbb_berlin/master.m3u8) | <img height="20" src="https://raw.githubusercontent.com/cytec/tvlogos/master/rbb.png"/> |
| 23 | RBB Brandenburg Ⓖ | [>](https://rbb-hls-brandenburg.akamaized.net/hls/live/2017825/rbb_brandenburg/master.m3u8) | <img height="20" src="https://raw.githubusercontent.com/cytec/tvlogos/master/rbb.png"/> |

View File

@ -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 "<h1>" in line.lower() and "</h1>" 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)