Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
legnaleurc committed Dec 22, 2023
1 parent b78d57e commit ca44cf9
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions drive/app/jav/_sauce.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ._types import JavData


async def _fetch_jav_data_from_javbus(session: ClientSession, jav_id: str, query: str):
async def _fetch_from_javbus(session: ClientSession, jav_id: str, query: str):
async with session.get(f"https://www.javbus.com/ja/{query}") as response:
if response.status != 200:
return None
Expand All @@ -21,9 +21,7 @@ async def _fetch_jav_data_from_javbus(session: ClientSession, jav_id: str, query
return _normalize_title(title.text)


async def _fetch_jav_data_from_javlibrary(
session: ClientSession, jav_id: str, query: str
):
async def _fetch_from_javlibrary(session: ClientSession, jav_id: str, query: str):
async with session.get(
f"http://www.javlibrary.com/ja/vl_searchbyid.php",
params={
Expand Down Expand Up @@ -58,7 +56,7 @@ async def _fetch_jav_data_from_javlibrary(
return None


async def _fetch_jav_data_from_javbee(session: ClientSession, jav_id: str, query: str):
async def _fetch_from_javbee(session: ClientSession, jav_id: str, query: str):
async with session.get(
"https://javbee.org/search",
params={
Expand All @@ -76,9 +74,7 @@ async def _fetch_jav_data_from_javbee(session: ClientSession, jav_id: str, query
return _normalize_title(title.text)


async def _fetch_jav_data_from_heydouga(
session: ClientSession, jav_id: str, query: str
):
async def _fetch_from_heydouga(session: ClientSession, jav_id: str, query: str):
async with session.get(
f"https://www.heydouga.com/moviepages/{query}/index.html",
) as response:
Expand All @@ -96,7 +92,7 @@ async def _fetch_jav_data_from_heydouga(
return f"{jav_id} {title}"


async def _fetch_jav_data_from_heyzo(session: ClientSession, jav_id: str, query: str):
async def _fetch_from_heyzo(session: ClientSession, jav_id: str, query: str):
async with session.get(
f"https://www.heyzo.com/moviepages/{query}/index.html",
) as response:
Expand All @@ -113,7 +109,7 @@ async def _fetch_jav_data_from_heyzo(session: ClientSession, jav_id: str, query:
return f"{jav_id} {title}"


async def _fetch_jav_data_from_carib(session: ClientSession, jav_id: str, query: str):
async def _fetch_from_carib(session: ClientSession, jav_id: str, query: str):
async with session.get(
f"https://www.caribbeancom.com/moviepages/{query}/index.html",
) as response:
Expand All @@ -136,7 +132,7 @@ async def _fetch_jav_data_from_carib(session: ClientSession, jav_id: str, query:
return f"{jav_id} {title} {actor}"


async def _fetch_jav_data_from_caribpr(session: ClientSession, jav_id: str, query: str):
async def _fetch_from_caribpr(session: ClientSession, jav_id: str, query: str):
async with session.get(
f"https://www.caribbeancompr.com/moviepages/{query}/index.html",
) as response:
Expand All @@ -158,7 +154,7 @@ async def _fetch_jav_data_from_caribpr(session: ClientSession, jav_id: str, quer
return f"{jav_id} {title} {_normalize_title(actor.text)}"


async def _fetch_jav_data_from_1pondo(session: ClientSession, jav_id: str, query: str):
async def _fetch_from_1pondo(session: ClientSession, jav_id: str, query: str):
m = re.match(r"\d{6}_\d{3}", jav_id)
if not m:
return None
Expand All @@ -176,9 +172,7 @@ async def _fetch_jav_data_from_1pondo(session: ClientSession, jav_id: str, query
return f"{jav_id} {title} {actor}"


async def _fetch_jav_data_from_10musume(
session: ClientSession, jav_id: str, query: str
):
async def _fetch_from_10musume(session: ClientSession, jav_id: str, query: str):
async with session.get(
f"https://www.10musume.com/dyn/phpauto/movie_details/movie_id/{jav_id}.json",
) as response:
Expand All @@ -193,16 +187,16 @@ async def _fetch_jav_data_from_10musume(


_SAUCE_DICT = {
"javbus": _fetch_jav_data_from_javbus,
"javlibrary": _fetch_jav_data_from_javlibrary,
"javbee": _fetch_jav_data_from_javbee,
"javtorrent": _fetch_jav_data_from_javbee,
"heydouga": _fetch_jav_data_from_heydouga,
"carib": _fetch_jav_data_from_carib,
"caribpr": _fetch_jav_data_from_caribpr,
"1pondo": _fetch_jav_data_from_1pondo,
"10musume": _fetch_jav_data_from_10musume,
"heyzo": _fetch_jav_data_from_heyzo,
"javbus": _fetch_from_javbus,
"javlibrary": _fetch_from_javlibrary,
"javbee": _fetch_from_javbee,
"javtorrent": _fetch_from_javbee,
"heydouga": _fetch_from_heydouga,
"carib": _fetch_from_carib,
"caribpr": _fetch_from_caribpr,
"1pondo": _fetch_from_1pondo,
"10musume": _fetch_from_10musume,
"heyzo": _fetch_from_heyzo,
}


Expand Down

0 comments on commit ca44cf9

Please sign in to comment.