Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #70 from Z-Jais/master
Browse files Browse the repository at this point in the history
Upgrade
  • Loading branch information
Ziedelth authored Mar 1, 2023
2 parents cebbbee + 1c3556d commit c8f585c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<version>3.5.0</version>
<executions>
<execution>
<id>make-assembly</id>
Expand Down Expand Up @@ -128,7 +128,7 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
<version>1.15.4</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/main/kotlin/fr/jais/scraper/Scraper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Scraper {
val platforms = listOf(
AnimationDigitalNetworkPlatform(this),
CrunchyrollPlatform(this),
NetflixPlatform(this),
// WakanimPlatform(this)
// NetflixPlatform(this),
// WakanimPlatform(this)
)
val countries = platforms.flatMap { it.countries }.distinct().mapNotNull { it.getConstructor().newInstance() }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AnimationDigitalNetworkConverter(private val platform: AnimationDigitalNet
val genres = showJson.getAsJsonArray("genres")?.mapNotNull { it.asString() } ?: emptyList()
Logger.config("Genres: ${genres.joinToString(", ")}")

if (!genres.any { it == "Animation japonaise" }) throw NotJapaneseAnimeException("Anime is not a Japanese anime")
if (!genres.any { it.startsWith("Animation ", true) }) throw NotJapaneseAnimeException("Show is not an anime")

// ----- SIMULCAST -----
Logger.info("Checking if anime is simulcasted...")
Expand All @@ -54,6 +54,7 @@ class AnimationDigitalNetworkConverter(private val platform: AnimationDigitalNet
val isAlternativeSimulcast =
descriptionLowercase?.startsWith("(Premier épisode ".lowercase()) == true ||
descriptionLowercase?.startsWith("(Diffusion des ".lowercase()) == true ||
descriptionLowercase?.startsWith("(Diffusion du ".lowercase()) == true ||
name.lowercase().startsWith("Kubo Won’t Let Me Be Invisible".lowercase())
if (!simulcasted && !isAlternativeSimulcast) throw NotSimulcastAnimeException("Anime is not simulcasted")

Expand Down

0 comments on commit c8f585c

Please sign in to comment.