mirror of
https://github.com/vinefeeder/TwinVine.git
synced 2026-07-15 18:10:04 +02:00
RTE Service
This commit is contained in:
@@ -67,11 +67,11 @@ The top level vinefeeder config file at TwinVine/packages/vinefeeder/src/vinefe
|
|||||||
|
|
||||||
Vinefeeder currently has 8 services for which search, browse and list-select are available
|
Vinefeeder currently has 8 services for which search, browse and list-select are available
|
||||||
|
|
||||||
ALL4 BBC ITVX MY5 PLEX STV TPTV TVNZ U
|
ALL4 BBC ITVX MY5 PLEX RTE STV TPTV TVNZ U
|
||||||
|
|
||||||
Envied has
|
Envied has
|
||||||
|
|
||||||
ALL4 AUBC CBS DSCP iP MAX MY5 NF PCOK PLEX ROKU SPOT TPTV TVNZ YTBE
|
ALL4 AUBC CBS CWTV DSCP iP MAX MY5 NF PCOK PLEX RTE ROKU SPOT TPTV TVNZ YTBE
|
||||||
ARD CBC CTV DSNP ITV MTSP NBLA NRK PLUTO RTE STV TUBI UKTV ZDF
|
ARD CBC CTV DSNP ITV MTSP NBLA NRK PLUTO RTE STV TUBI UKTV ZDF
|
||||||
These services have web-origins and not all have been tested by me.
|
These services have web-origins and not all have been tested by me.
|
||||||
|
|
||||||
|
|||||||
@@ -6,3 +6,8 @@
|
|||||||
|
|
||||||
**18 Sept 2025:**
|
**18 Sept 2025:**
|
||||||
- Fully implemented Plex service - categories now selectable.
|
- Fully implemented Plex service - categories now selectable.
|
||||||
|
|
||||||
|
**22 Sept 2025:**
|
||||||
|
- Added RTE service with search and direct url entry.
|
||||||
|
- updated README
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ from unidecode import unidecode
|
|||||||
import re
|
import re
|
||||||
import json
|
import json
|
||||||
from httpx import Client
|
from httpx import Client
|
||||||
|
import unicodedata
|
||||||
|
from urllib.parse import unquote
|
||||||
|
|
||||||
client = Client()
|
client = Client()
|
||||||
|
|
||||||
@@ -51,8 +53,11 @@ class RteLoader(BaseLoader):
|
|||||||
if opts:
|
if opts:
|
||||||
RteLoader.options = opts
|
RteLoader.options = opts
|
||||||
self.options_list = split_options(RteLoader.options)
|
self.options_list = split_options(RteLoader.options)
|
||||||
|
# RTE with aodd accented chars
|
||||||
|
search_term = normalize_url(search_term)
|
||||||
# direct download
|
# direct download
|
||||||
if "http" in search_term and inx == 1:
|
if "http" in search_term and inx == 1:
|
||||||
|
|
||||||
self.options_list = split_options(self.options)
|
self.options_list = split_options(self.options)
|
||||||
try:
|
try:
|
||||||
if self.options_list[0] == "":
|
if self.options_list[0] == "":
|
||||||
@@ -142,7 +147,7 @@ class RteLoader(BaseLoader):
|
|||||||
def second_fetch(self, selected):
|
def second_fetch(self, selected):
|
||||||
|
|
||||||
episode = self.get_series(selected)
|
episode = self.get_series(selected)
|
||||||
url = episode[0]['url']
|
url = normalize_url(episode[0]['url'])
|
||||||
guid = url.split('/')[-1]
|
guid = url.split('/')[-1]
|
||||||
type = episode[0]['type']
|
type = episode[0]['type']
|
||||||
if not type == 'series':
|
if not type == 'series':
|
||||||
@@ -225,4 +230,13 @@ class RteLoader(BaseLoader):
|
|||||||
|
|
||||||
def fetch_videos_by_category(self, browse_url):
|
def fetch_videos_by_category(self, browse_url):
|
||||||
|
|
||||||
print("Search by category is not implemented for this service.")
|
print("Search by category is not implemented for this service.")
|
||||||
|
|
||||||
|
def normalize_url(url_string):
|
||||||
|
# remove accented and url quoted chats from string
|
||||||
|
url = url_string
|
||||||
|
decoded_url = unquote(url)
|
||||||
|
# Normalize and remove non-ASCII characters
|
||||||
|
normalized_url = unicodedata.normalize('NFKD', decoded_url).encode('ASCII', 'ignore').decode()
|
||||||
|
|
||||||
|
return(normalized_url)
|
||||||
Reference in New Issue
Block a user