Fix anime-ultime
This commit is contained in:
parent
353ed7fb27
commit
5a1d0da33e
@ -49,6 +49,7 @@ class AnimeUltime(Bridge):
|
||||
torrents: List[RemoteFile] = []
|
||||
html = BeautifulSoup(response.content, "html.parser")
|
||||
title = html.select_one("div.title")
|
||||
titre = html.select_one("div.titre")
|
||||
history = html.select_one("h1")
|
||||
player = html.select_one("div.AUVideoPlayer")
|
||||
tables = html.select("table.jtable")
|
||||
@ -93,15 +94,18 @@ class AnimeUltime(Bridge):
|
||||
date=parse(h3s[i].get_text()[:-3], ["%A %d %B %Y"]),
|
||||
)
|
||||
)
|
||||
elif player and title and history and tables:
|
||||
elif player and titre and history:
|
||||
torrents.append(
|
||||
RemoteFile(
|
||||
bridge=self.__class__.__name__,
|
||||
id=player["data-serie"],
|
||||
category=title.get_text(),
|
||||
category=titre.get_text().split("(")[0].strip(),
|
||||
name=history.get_text(),
|
||||
link=f"{self.base_url}/file-0-1/{player['data-serie']}",
|
||||
date=tables[0].find_all("tr")[1].find_all("td")[1].get_text(),
|
||||
date=datetime.strptime(
|
||||
tables[0].find_all("tr")[1].find_all("td")[1].get_text(),
|
||||
"%d/%m/%y",
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -148,6 +148,28 @@ async def test_history(requests_mock: Mocker):
|
||||
category="Film",
|
||||
name="Crayon Shin-chan - Arashi wo Yobu Appare! Sengoku Dai Kassen",
|
||||
link="http://www.anime-ultime.net/file-0-1/167/Crayon-Shin-chan---Arashi-wo-Yobu-Appare-Sengoku-Dai-Kassen-vostfr",
|
||||
date="2006-04-10 00:00:00"
|
||||
date="2006-04-10 00:00:00",
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@mark.asyncio
|
||||
async def test_search_one(requests_mock: Mocker):
|
||||
requests_mock.real_http = True
|
||||
requests_mock.post(
|
||||
AnimeUltime().search_url("akuma"),
|
||||
text=requests.get(
|
||||
"http://www.anime-ultime.net/file-0-1/4631/Akuma-no-Riddle-Shousha-wa-Dare-Nukiuchi-Test-vostfr"
|
||||
).text,
|
||||
)
|
||||
|
||||
assert await AnimeUltime().search("akuma") == [
|
||||
RemoteFile(
|
||||
bridge="AnimeUltime",
|
||||
id=4631,
|
||||
category="OAV",
|
||||
name="Akuma no Riddle: Shousha wa Dare? Nukiuchi Test vostfr",
|
||||
link="http://www.anime-ultime.net/file-0-1/4631",
|
||||
date="2014-12-27 00:00:00",
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user