Skip to content

Commit

Permalink
Add Vidmoly
Browse files Browse the repository at this point in the history
  • Loading branch information
Commandcracker committed Dec 7, 2024
1 parent 7099479 commit b118333
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ List of supported video hoster.
- [x] Vidoza
- [x] Doodstream
- [x] SpeedFiles
- [x] ~~Streamtape~~
- [x] Vidmoly
- [x] Streamtape (Removed from AniWorld & SerienStream)
- [ ] Filemoon
- [ ] Luluvdo
- [ ] Vidmoly

## Player

Expand Down
2 changes: 1 addition & 1 deletion src/gucken/__init__.py
Original file line number Diff line number Diff line change
@@ -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.5"
__version__ = "0.2.6"
16 changes: 8 additions & 8 deletions src/gucken/hoster/_hosters.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
from textual._two_way_dict import TwoWayDict

from .doodstream import DoodstreamHoster
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 .doodstream import DoodstreamHoster
from .vidmoly import VidmolyHoster
from .filemoon import FilemoonHoster
from .luluvdo import LuluvdoHoster
from .streamtape import StreamtapeHoster

hoster = TwoWayDict(
{
"DS": DoodstreamHoster,
"ST": StreamtapeHoster,
"VEO": VOEHoster,
"VZ": VidozaHoster,
"SF": SpeedFilesHoster,
"DS": DoodstreamHoster,
"VM": VidmolyHoster,
"FM": FilemoonHoster,
"LU": LuluvdoHoster,
"SF": SpeedFilesHoster,
"VM": VidmolyHoster
"ST": StreamtapeHoster
}
)
2 changes: 1 addition & 1 deletion src/gucken/hoster/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DirectLink:

async def check_is_working(self) -> bool:
try:
async with AsyncClient(verify=False) as client:
async with AsyncClient(verify=False, auto_referer=False) as client:
response = await client.head(
self.url, headers=self.headers
)
Expand Down
16 changes: 13 additions & 3 deletions src/gucken/hoster/vidmoly.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
from dataclasses import dataclass
from re import compile as re_compile

from ..networking import AsyncClient

from .common import DirectLink, Hoster

VIDMOLY_PATTERN = re_compile("")
VIDMOLY_PATTERN = re_compile("sources: \[{file:\"(?P<url>.*?)\"}]")

# TODO: WIP !!!

@dataclass
class VidmolyHoster(Hoster):
requires_headers = True

async def get_direct_link(self) -> DirectLink:
return DirectLink("WIP")
async with AsyncClient(verify=False, auto_referer=False) as client:
response = await client.get(self.url)
match = VIDMOLY_PATTERN.search(response.text)
return DirectLink(
url=match.group("url"),
headers={"Referer": "https://vidmoly.to/"}
)
10 changes: 5 additions & 5 deletions src/gucken/provider/aniworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
from typing import Union

from bs4 import BeautifulSoup
from ..networking import AsyncClient, AcceptLanguage

from ..hoster.doodstream import DoodstreamHoster
from ..hoster.streamtape import StreamtapeHoster
from ..networking import AsyncClient, AcceptLanguage
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.doodstream import DoodstreamHoster
from ..hoster.vidmoly import VidmolyHoster
from ..hoster.filemoon import FilemoonHoster
from ..hoster.luluvdo import LuluvdoHoster
from ..hoster.streamtape import StreamtapeHoster
from .common import Episode, Hoster, Language, Provider, SearchResult, Series
from ..utils import json_loads

Expand Down
8 changes: 4 additions & 4 deletions src/gucken/provider/serienstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
from bs4 import BeautifulSoup

from ..networking import AcceptLanguage, AsyncClient
from ..hoster.doodstream import DoodstreamHoster
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.doodstream import DoodstreamHoster
from ..hoster.vidmoly import VidmolyHoster
from ..hoster.filemoon import FilemoonHoster
from ..hoster.luluvdo import LuluvdoHoster
from ..hoster.streamtape import StreamtapeHoster
from .common import Episode, Hoster, Language, Provider, SearchResult, Series
from ..utils import json_loads

Expand Down
2 changes: 1 addition & 1 deletion src/gucken/resources/default_settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ hoster = [
"VZ",
"DS",
"SF",
"VM",
"FM",
"LU",
"VM",
"ST"
]
update_checker = true
Expand Down

0 comments on commit b118333

Please sign in to comment.