diff --git a/README.md b/README.md index 086237f..2126e3a 100644 --- a/README.md +++ b/README.md @@ -119,10 +119,14 @@ List of supported Anime sites List of supported video hoster. -- [x] Streamtape - [x] VEO - [x] Vidoza - [x] Doodstream +- [x] SpeedFiles +- [x] ~~Streamtape~~ +- [ ] Filemoon +- [ ] Luluvdo +- [ ] Vidmoly ## Player diff --git a/src/gucken/__init__.py b/src/gucken/__init__.py index 606c8c6..70ad689 100644 --- a/src/gucken/__init__.py +++ b/src/gucken/__init__.py @@ -1,4 +1,4 @@ import warnings warnings.filterwarnings('ignore', message='Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning') -__version__ = "0.2.4" +__version__ = "0.2.5" diff --git a/src/gucken/hoster/_hosters.py b/src/gucken/hoster/_hosters.py index f2b6712..d6b6377 100644 --- a/src/gucken/hoster/_hosters.py +++ b/src/gucken/hoster/_hosters.py @@ -4,6 +4,10 @@ from .streamtape import StreamtapeHoster from .veo import VOEHoster from .vidoza import VidozaHoster +from .filemoon import FilemoonHoster +from .luluvdo import LuluvdoHoster +from .speedfiles import SpeedFilesHoster +from .vidmoly import VidmolyHoster hoster = TwoWayDict( { @@ -11,5 +15,9 @@ "ST": StreamtapeHoster, "VEO": VOEHoster, "VZ": VidozaHoster, + "FM": FilemoonHoster, + "LU": LuluvdoHoster, + "SF": SpeedFilesHoster, + "VM": VidmolyHoster } ) diff --git a/src/gucken/hoster/filemoon.py b/src/gucken/hoster/filemoon.py new file mode 100644 index 0000000..af227a2 --- /dev/null +++ b/src/gucken/hoster/filemoon.py @@ -0,0 +1,12 @@ +from re import compile as re_compile + +from ..networking import AsyncClient + +from .common import DirectLink, Hoster + +FILEMOON_PATTERN = re_compile("") + +# TODO: WIP !!! +class FilemoonHoster(Hoster): + async def get_direct_link(self) -> DirectLink: + return DirectLink("WIP") diff --git a/src/gucken/hoster/luluvdo.py b/src/gucken/hoster/luluvdo.py new file mode 100644 index 0000000..464c55a --- /dev/null +++ b/src/gucken/hoster/luluvdo.py @@ -0,0 +1,12 @@ +from re import compile as re_compile + +from ..networking import AsyncClient + +from .common import DirectLink, Hoster + +LULUVODO_PATTERN = re_compile("") + +# TODO: WIP !!! +class LuluvdoHoster(Hoster): + async def get_direct_link(self) -> DirectLink: + return DirectLink("WIP") diff --git a/src/gucken/hoster/speedfiles.py b/src/gucken/hoster/speedfiles.py new file mode 100644 index 0000000..b390b43 --- /dev/null +++ b/src/gucken/hoster/speedfiles.py @@ -0,0 +1,30 @@ +from re import compile as re_compile +from base64 import b64decode + +from ..networking import AsyncClient + +from .common import DirectLink, Hoster + +SPEEDFILES_PATTERN = re_compile("var _0x5opu234 = \"(?P.*?)\";") + +class SpeedFilesHoster(Hoster): + async def get_direct_link(self) -> DirectLink: + async with AsyncClient(verify=False) as client: + response = await client.get(self.url) + match = SPEEDFILES_PATTERN.search(response.text) + stuff = match.group("stuff") + stuff = b64decode(stuff).decode() + stuff = stuff.swapcase() + stuff = ''.join(reversed(stuff)) + stuff = b64decode(stuff).decode() + stuff = ''.join(reversed(stuff)) + stuff2 = "" + for i in range(0, len(stuff), 2): + stuff2 += chr(int(stuff[i:i + 2], 16)) + stuff3 = "" + for char in stuff2: + stuff3 += chr(ord(char) - 3) + stuff3 = stuff3.swapcase() + stuff3 = ''.join(reversed(stuff3)) + stuff3 = b64decode(stuff3).decode() + return DirectLink(stuff3) diff --git a/src/gucken/hoster/vidmoly.py b/src/gucken/hoster/vidmoly.py new file mode 100644 index 0000000..3bb4b11 --- /dev/null +++ b/src/gucken/hoster/vidmoly.py @@ -0,0 +1,12 @@ +from re import compile as re_compile + +from ..networking import AsyncClient + +from .common import DirectLink, Hoster + +VIDMOLY_PATTERN = re_compile("") + +# TODO: WIP !!! +class VidmolyHoster(Hoster): + async def get_direct_link(self) -> DirectLink: + return DirectLink("WIP") diff --git a/src/gucken/provider/aniworld.py b/src/gucken/provider/aniworld.py index 8787541..98f46dd 100644 --- a/src/gucken/provider/aniworld.py +++ b/src/gucken/provider/aniworld.py @@ -10,6 +10,10 @@ from ..hoster.streamtape import StreamtapeHoster from ..hoster.veo import VOEHoster from ..hoster.vidoza import VidozaHoster +from ..hoster.filemoon import FilemoonHoster +from ..hoster.luluvdo import LuluvdoHoster +from ..hoster.speedfiles import SpeedFilesHoster +from ..hoster.vidmoly import VidmolyHoster from .common import Episode, Hoster, Language, Provider, SearchResult, Series from ..utils import json_loads @@ -23,6 +27,14 @@ def provider_to_hoster(provider: str, url: str) -> Hoster: return VidozaHoster(url) if provider == "Streamtape": return StreamtapeHoster(url) + if provider == "SpeedFiles": + return SpeedFilesHoster(url) + if provider == "Filemoon": + return FilemoonHoster(url) + if provider == "Luluvdo": + return LuluvdoHoster(url) + if provider == "Vidmoly": + return VidmolyHoster(url) def lang_img_src_lang_name_to_lang(name: str) -> Language: @@ -276,6 +288,14 @@ async def get_episodes_from_soup( hoster.add(VidozaHoster) if t == "Streamtape": hoster.add(StreamtapeHoster) + if t == "SpeedFiles": + hoster.add(SpeedFilesHoster) + if t == "Filemoon": + hoster.add(FilemoonHoster) + if t == "Luluvdo": + hoster.add(LuluvdoHoster) + if t == "Vidmoly": + hoster.add(VidmolyHoster) e_count += 1 title_en = title.find("span").text.strip() diff --git a/src/gucken/provider/serienstream.py b/src/gucken/provider/serienstream.py index 9c1790f..0be1d95 100644 --- a/src/gucken/provider/serienstream.py +++ b/src/gucken/provider/serienstream.py @@ -10,6 +10,10 @@ from ..hoster.streamtape import StreamtapeHoster from ..hoster.veo import VOEHoster from ..hoster.vidoza import VidozaHoster +from ..hoster.filemoon import FilemoonHoster +from ..hoster.luluvdo import LuluvdoHoster +from ..hoster.speedfiles import SpeedFilesHoster +from ..hoster.vidmoly import VidmolyHoster from .common import Episode, Hoster, Language, Provider, SearchResult, Series from ..utils import json_loads @@ -32,6 +36,14 @@ def provider_to_hoster(provider: str, url: str) -> Hoster: return VidozaHoster(url) if provider == "Streamtape": return StreamtapeHoster(url) + if provider == "SpeedFiles": + return SpeedFilesHoster(url) + if provider == "Filemoon": + return FilemoonHoster(url) + if provider == "Luluvdo": + return LuluvdoHoster(url) + if provider == "Vidmoly": + return VidmolyHoster(url) def lang_img_src_lang_name_to_lang(name: str) -> Language: @@ -286,6 +298,14 @@ async def get_episodes_from_soup( hoster.add(VidozaHoster) if t == "Streamtape": hoster.add(StreamtapeHoster) + if t == "SpeedFiles": + hoster.add(SpeedFilesHoster) + if t == "Filemoon": + hoster.add(FilemoonHoster) + if t == "Luluvdo": + hoster.add(LuluvdoHoster) + if t == "Vidmoly": + hoster.add(VidmolyHoster) e_count += 1 title_en = title.find("span").text.strip() diff --git a/src/gucken/resources/default_settings.toml b/src/gucken/resources/default_settings.toml index b0296e3..2de7dbc 100644 --- a/src/gucken/resources/default_settings.toml +++ b/src/gucken/resources/default_settings.toml @@ -11,10 +11,14 @@ language = [ "JP_ENSUB" ] hoster = [ - "ST", "VEO", "VZ", - "DS" + "DS", + "SF", + "FM", + "LU", + "VM", + "ST" ] update_checker = true