anime-sama-api 0.2.2.post3__tar.gz → 0.2.2.post4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/PKG-INFO +1 -1
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/season.py +1 -1
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/top_level.py +12 -2
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/pyproject.toml +1 -1
- anime_sama_api-0.2.2.post4/tests/data/catalogue_data.py +6 -0
- anime_sama_api-0.2.2.post4/tests/data/season_data.py +32 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/test_download.py +1 -1
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/test_top_level.py +1 -1
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/uv.lock +1 -1
- anime_sama_api-0.2.2.post3/tests/data/catalogue_data.py +0 -6
- anime_sama_api-0.2.2.post3/tests/data/season_data.py +0 -32
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/.github/workflows/ci.yaml +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/.github/workflows/release.yaml +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/.gitignore +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/.python-version +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/LICENSE +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/README.md +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/TODO.md +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/__init__.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/catalogue.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/__main__.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/config.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/config.toml +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/downloader.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/episode_extra_info.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/error_handeling.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/internal_player.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/play_menu.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/utils.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/episode.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/langs.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/utils.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/debug_vidmoly.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/exemples/new_episodes_rss.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/exemples/run_cli_(for_debugging).py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/__init__.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/data/episode_data.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/test_catalogue.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/test_cli_utils.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/test_seasons.py +0 -0
- {anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/tests/test_utils.py +0 -0
|
@@ -27,10 +27,20 @@ async def find_site_url(
|
|
|
27
27
|
if response.is_error:
|
|
28
28
|
return None
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
# * Sometimes need to check for the great word "anime-sama" in lowercase or uppercase but if add re.IGNORECASE it will work
|
|
31
|
+
match = re.search(
|
|
32
|
+
r"href=\"(.+?)\">Accéder à Anime-Sama", response.text, re.IGNORECASE
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# * Ajouter un suive de redirection d'url au match au cas ou le site n'est pas a jour et redirige vers une autre url, puis garder l'url finale
|
|
31
36
|
|
|
32
37
|
if match:
|
|
33
|
-
|
|
38
|
+
redirected = await client.get(match.group(1), follow_redirects=False)
|
|
39
|
+
return (
|
|
40
|
+
redirected.headers["location"] + "/"
|
|
41
|
+
if redirected.has_redirect_location
|
|
42
|
+
else match.group(1)
|
|
43
|
+
)
|
|
34
44
|
|
|
35
45
|
|
|
36
46
|
@dataclass(frozen=True)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
from anime_sama_api.catalogue import Catalogue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
one_piece = Catalogue("https://anime-sama.tv/catalogue/one-piece/")
|
|
5
|
+
mha = Catalogue("https://anime-sama.tv/catalogue/my-hero-academia/")
|
|
6
|
+
gumball = Catalogue("https://anime-sama.tv/catalogue/le-monde-incroyable-de-gumball/")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from anime_sama_api.season import Season
|
|
2
|
+
|
|
3
|
+
one_piece = (
|
|
4
|
+
[
|
|
5
|
+
Season(f"https://anime-sama.tv/catalogue/one-piece/saison{i}/")
|
|
6
|
+
for i in range(1, 12)
|
|
7
|
+
]
|
|
8
|
+
+ [
|
|
9
|
+
Season("https://anime-sama.tv/catalogue/one-piece/film/"),
|
|
10
|
+
Season("https://anime-sama.tv/catalogue/one-piece/oav/"),
|
|
11
|
+
Season("https://anime-sama.tv/catalogue/one-piece/saison1hs/"),
|
|
12
|
+
Season("https://anime-sama.tv/catalogue/one-piece/kai/"),
|
|
13
|
+
]
|
|
14
|
+
+ [
|
|
15
|
+
Season(f"https://anime-sama.tv/catalogue/one-piece/kai{i}/")
|
|
16
|
+
for i in range(2, 12)
|
|
17
|
+
]
|
|
18
|
+
)
|
|
19
|
+
gumball = [
|
|
20
|
+
Season(f"https://anime-sama.tv/catalogue/le-monde-incroyable-de-gumball/saison{i}/")
|
|
21
|
+
for i in range(1, 7)
|
|
22
|
+
] + [
|
|
23
|
+
Season("https://anime-sama.tv/catalogue/le-monde-incroyable-de-gumball/saison1hs/")
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
mha = [
|
|
27
|
+
Season(f"https://anime-sama.tv/catalogue/my-hero-academia/saison{i}/")
|
|
28
|
+
for i in range(1, 9)
|
|
29
|
+
] + [
|
|
30
|
+
Season("https://anime-sama.tv/catalogue/my-hero-academia/film/"),
|
|
31
|
+
Season("https://anime-sama.tv/catalogue/my-hero-academia/oav/"),
|
|
32
|
+
]
|
|
@@ -4,7 +4,7 @@ from anime_sama_api.top_level import AnimeSama
|
|
|
4
4
|
from .data import catalogue_data
|
|
5
5
|
|
|
6
6
|
pytest_plugins = ("pytest_asyncio",)
|
|
7
|
-
anime_sama = AnimeSama(site_url="https://anime-sama.
|
|
7
|
+
anime_sama = AnimeSama(site_url="https://anime-sama.tv/")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@pytest.mark.asyncio(loop_scope="session")
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
from anime_sama_api.catalogue import Catalogue
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
one_piece = Catalogue("https://anime-sama.si/catalogue/one-piece/")
|
|
5
|
-
mha = Catalogue("https://anime-sama.si/catalogue/my-hero-academia/")
|
|
6
|
-
gumball = Catalogue("https://anime-sama.si/catalogue/le-monde-incroyable-de-gumball/")
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
from anime_sama_api.season import Season
|
|
2
|
-
|
|
3
|
-
one_piece = (
|
|
4
|
-
[
|
|
5
|
-
Season(f"https://anime-sama.si/catalogue/one-piece/saison{i}/")
|
|
6
|
-
for i in range(1, 12)
|
|
7
|
-
]
|
|
8
|
-
+ [
|
|
9
|
-
Season("https://anime-sama.si/catalogue/one-piece/film/"),
|
|
10
|
-
Season("https://anime-sama.si/catalogue/one-piece/oav/"),
|
|
11
|
-
Season("https://anime-sama.si/catalogue/one-piece/saison1hs/"),
|
|
12
|
-
Season("https://anime-sama.si/catalogue/one-piece/kai/"),
|
|
13
|
-
]
|
|
14
|
-
+ [
|
|
15
|
-
Season(f"https://anime-sama.si/catalogue/one-piece/kai{i}/")
|
|
16
|
-
for i in range(2, 12)
|
|
17
|
-
]
|
|
18
|
-
)
|
|
19
|
-
gumball = [
|
|
20
|
-
Season(f"https://anime-sama.si/catalogue/le-monde-incroyable-de-gumball/saison{i}/")
|
|
21
|
-
for i in range(1, 7)
|
|
22
|
-
] + [
|
|
23
|
-
Season("https://anime-sama.si/catalogue/le-monde-incroyable-de-gumball/saison1hs/")
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
mha = [
|
|
27
|
-
Season(f"https://anime-sama.si/catalogue/my-hero-academia/saison{i}/")
|
|
28
|
-
for i in range(1, 9)
|
|
29
|
-
] + [
|
|
30
|
-
Season("https://anime-sama.si/catalogue/my-hero-academia/film/"),
|
|
31
|
-
Season("https://anime-sama.si/catalogue/my-hero-academia/oav/"),
|
|
32
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/episode_extra_info.py
RENAMED
|
File without changes
|
{anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/error_handeling.py
RENAMED
|
File without changes
|
{anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/anime_sama_api/cli/internal_player.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{anime_sama_api-0.2.2.post3 → anime_sama_api-0.2.2.post4}/exemples/run_cli_(for_debugging).py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|