Skip to content

Commit

Permalink
add Vidmoly provider
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixthrush committed Dec 7, 2024
1 parent 6e31a16 commit d176b03
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aniworld/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def parse_arguments():
action_group.add_argument(
'-p', '--provider',
type=str,
choices=['Vidoza', 'Streamtape', 'VOE', 'Doodstream'],
choices=['Vidoza', 'Streamtape', 'VOE', 'Doodstream', 'Vidmoly'],
help='Provider choice'
)

Expand Down
4 changes: 3 additions & 1 deletion src/aniworld/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
streamtape_get_direct_link,
vidoza_get_direct_link,
voe_get_direct_link,
vidmoly_get_direct_link
)


Expand Down Expand Up @@ -399,7 +400,8 @@ def execute(params: Dict[str, Any]) -> None:
"Vidoza": vidoza_get_direct_link,
"VOE": voe_get_direct_link,
"Doodstream": doodstream_get_direct_link,
"Streamtape": streamtape_get_direct_link
"Streamtape": streamtape_get_direct_link,
"Vidmoly": vidmoly_get_direct_link
}

selected_episodes = params['selected_episodes']
Expand Down
1 change: 1 addition & 0 deletions src/aniworld/extractors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .provider.streamtape import streamtape_get_direct_link
from .provider.vidoza import vidoza_get_direct_link
from .provider.voe import voe_get_direct_link
from .provider.vidmoly import vidmoly_get_direct_link
from .provider.speedfiles import speedfiles_get_direct_link

from .nhentai.nhentai import nhentai
Expand Down
16 changes: 16 additions & 0 deletions src/aniworld/extractors/provider/vidmoly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import re

from aniworld import globals as aniworld_globals


def vidmoly_get_direct_link(soup):
scripts = soup.find_all('script')
file_link_pattern = r'file:\s*"(https?://.*?)"'

for script in scripts:
if script.string:
match = re.search(file_link_pattern, script.string)
if match:
file_link = match.group(1)
return file_link
return None

0 comments on commit d176b03

Please sign in to comment.