Skip to content

Commit

Permalink
fix: animesaturn scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
aleganza committed Apr 14, 2024
1 parent 6362574 commit 80104be
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/providers/anime/9anime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/providers/anime/9anime.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/providers/anime/animesaturn.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/providers/anime/animesaturn.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions dist/providers/anime/gogoanime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/providers/anime/gogoanime.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"test": "jest",
"test:gogoanime": "jest ./test/anime/gogoanime.test.ts",
"test:animeunity": "jest ./test/anime/animeunity.test.ts",
"test:animesaturn": "jest ./test/anime/animesaturn.test.ts",
"test:zoro": "jest ./test/anime/zoro.test.ts",
"test:anime": "jest ./test/anime",
"test:books": "jest ./test/books/libgen.test.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/providers/anime/animesaturn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class AnimeSaturn extends AnimeParser {
const fakeData = await this.client.get(`${this.baseUrl}ep/${episodeId}`);
const $2 = await load(fakeData.data);

const serverOneUrl = $2("div > a:contains('Streaming')").attr('href'); // scrape from server 1 (m3u8 and mp4 urls)
const serverOneUrl = $2("div > a:contains('Guarda lo streaming')").attr('href'); // scrape from server 1 (m3u8 and mp4 urls)
if (serverOneUrl == null) throw new Error('Invalid url');

let data = await this.client.get(serverOneUrl);
Expand Down
2 changes: 1 addition & 1 deletion src/providers/anime/gogoanime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class Gogoanime extends AnimeParser {
throw new Error('Something went wrong. Please try again later.');
}
};
fetchDirectDownloadLink = async (downloadUrl: string, captchaToken: string?): Promise<{ source: string | undefined; link: string | undefined }[]> => {
fetchDirectDownloadLink = async (downloadUrl: string, captchaToken?: string): Promise<{ source: string | undefined; link: string | undefined }[]> => {
const downloadLinks: { source: string | undefined; link: string | undefined }[] = [];

const baseUrl = downloadUrl.split('?')[0];
Expand Down

0 comments on commit 80104be

Please sign in to comment.