anime-dl / anime-downloader

A simple but powerful anime downloader and streamer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Animesuge not working.

queeup opened this issue · comments

Describe the bug

Animesuge not working.

To reproduce

anime --log-level DEBUG watch --new 'Hero Academia 5'

LOG
https://pastebin.ubuntu.com/p/Znqw4dTkfh/

From the website I can see that it has added google captcha.
So I won't even try to fix this.

Anyone that wants to fight captcha is welcome to do so.

I see. Bye bye animesuge then.

Now site is working but error on the episode scrape.

LOG:
https://pastebin.ubuntu.com/p/qnVs5jzBFM/

  1. As I said, you have to fix the problem with the captcha for it to scrape the episode.
  2. Can you post the log directly on github? It's not good practice to link to external sources.
    example
LOG LOG GOES HERE
<details>
<summary>LOG</summary>
LOG GOES HERE
</details>
  1. When I try to watch something from site I don't see any captcha. What I see from log, there is a scrape problem. URL strings are not good regexed maybe?
  2. Sorry for that. Here it is:
LOG
~ # anime-downloader --log-level DEBUG dl 'My Heroes academis 5'
2021-05-07 15:11:02 LibreELEC anime_downloader.util[1] INFO anime-downloader 5.0.9
2021-05-07 15:11:02 LibreELEC anime_downloader.util[1] DEBUG Platform: Linux-5.10.27-armv7l-with
2021-05-07 15:11:02 LibreELEC anime_downloader.util[1] DEBUG Python 3.9.1
2021-05-07 15:11:02 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG -----
2021-05-07 15:11:02 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG GET https://animesuge.io/ajax/anime/search
2021-05-07 15:11:02 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG {'params': {'keyword': 'My Heroes academis 5'}}
2021-05-07 15:11:02 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11'}
2021-05-07 15:11:02 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG -----
send: b'GET /ajax/anime/search?keyword=My+Heroes+academis+5 HTTP/1.1\r\nHost: animesuge.io\r\nuser-agent: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 07 May 2021 15:11:03 GMT
header: Content-Type: application/json
header: Transfer-Encoding: chunked
header: Connection: keep-alive
header: Set-Cookie: __cfduid=d039e466b64e82048afd9aa9984ae1e051620400262; expires=Sun, 06-Jun-21 15:11:02 GMT; path=/; domain=.animesuge.io; HttpOnly; SameSite=Lax
header: X-Frame-Options: SAMEORIGIN
header: Content-Encoding: gzip
header: x-dmc: h2
header: CF-Cache-Status: DYNAMIC
header: cf-request-id: 09e8fae6eb00001cc0b4a4d000000001
header: Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
header: Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=q1NG%2FzjfnIwehlDIvvbck4S7dDbdPgtqiAYOU4d%2BVU1cHJAX%2BZt%2BR2hHPVtYFKg%2BD%2FGrrmgUjD2UeTTstfSkYYWwfsa94InyglOu%2B1A%3D"}],"max_age":604800,"group":"cf-nel"}
header: NEL: {"max_age":604800,"report_to":"cf-nel"}
header: Server: cloudflare
header: CF-RAY: 64bb60eb1fb81cc0-BUD
header: alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
2021-05-07 15:11:03 LibreELEC anime_downloader.session[1] DEBUG uncached request
2021-05-07 15:11:03 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG https://animesuge.io/ajax/anime/search?keyword=My+Heroes+academis+5
2021-05-07 15:11:03 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG /tmp/animedlz_yae6fe/tmpwldqf8nx
+--------+------------------------------------+--------+
|      5 | My Hero Academia: Two Heroes (Dub) |        |
|      4 | Stand My Heroes: Piece of Truth    |        |
|      3 | My Hero Academia: Two Heroes       |        |
|      2 | My Hero Academia 5                 |        |
|      1 | My Hero Academia 5 (Dub)           |        |
|--------+------------------------------------+--------|
|   SlNo | Title                              | Meta   |
+--------+------------------------------------+--------+
Enter the anime no: [1]: 2
2021-05-07 15:11:05 LibreELEC anime_downloader.util[1] INFO Selected My Hero Academia 5
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.anime[1] INFO Extracting episode info from page
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG -----
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG GET https://animesuge.io/anime/my-hero-academia-5-653z
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG {}
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11'}
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG -----
send: b'GET /anime/my-hero-academia-5-653z HTTP/1.1\r\nHost: animesuge.io\r\nuser-agent: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 07 May 2021 15:11:05 GMT
header: Content-Type: text/html; charset=UTF-8
header: Transfer-Encoding: chunked
header: Connection: keep-alive
header: Set-Cookie: __cfduid=d156aecb9df92c4c8e722d24ef166edbb1620400265; expires=Sun, 06-Jun-21 15:11:05 GMT; path=/; domain=.animesuge.io; HttpOnly; SameSite=Lax
header: X-Frame-Options: SAMEORIGIN
header: x-dmc: h2
header: CF-Cache-Status: DYNAMIC
header: cf-request-id: 09e8faf046000038c0b6a90000000001
header: Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
header: Report-To: {"group":"cf-nel","endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=RiqfVH%2BvRENP5GGhogUvxYsCqrEfzo4O9OmdFTMGa0hDbAfpcrq0C5q1bCx4h1qKLIwONF3ooT5E3V8ANyYFQ8rsb2J7obmB6TaUCtI%3D"}],"max_age":604800}
header: NEL: {"report_to":"cf-nel","max_age":604800}
header: Server: cloudflare
header: CF-RAY: 64bb60fa0cc038c0-VIE
header: Content-Encoding: gzip
header: alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
2021-05-07 15:11:05 LibreELEC anime_downloader.session[1] DEBUG uncached request
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG https://animesuge.io/anime/my-hero-academia-5-653z
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG /tmp/animedlz_yae6fe/tmptgyu7_a7
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG -----
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG GET https://animesuge.io/ajax/anime/servers
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG {'params': {'id': '653z'}}
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG {'user-agent': 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11'}
2021-05-07 15:11:05 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG -----
send: b'GET /ajax/anime/servers?id=653z HTTP/1.1\r\nHost: animesuge.io\r\nuser-agent: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 07 May 2021 15:11:06 GMT
header: Content-Type: application/json
header: Transfer-Encoding: chunked
header: Connection: keep-alive
header: Set-Cookie: __cfduid=d25554d1aef897b31f3e108e7c6dc24e31620400265; expires=Sun, 06-Jun-21 15:11:05 GMT; path=/; domain=.animesuge.io; HttpOnly; SameSite=Lax
header: X-Frame-Options: SAMEORIGIN
header: Content-Encoding: gzip
header: x-dmc: b0
header: CF-Cache-Status: DYNAMIC
header: cf-request-id: 09e8faf2a500002774b1bae000000001
header: Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
header: Report-To: {"group":"cf-nel","endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=X%2FJ2jB8beL2c3zflGJAIHsc0UEiu399HeQy7ILxZ%2FuHXfocpUDCdFR6CneSynO18w6yLAjUhum4sINRy%2F9e1CWm%2FR2MLfagM%2FnC4jIk%3D"}],"max_age":604800}
header: NEL: {"max_age":604800,"report_to":"cf-nel"}
header: Server: cloudflare
header: CF-RAY: 64bb60fdca502774-PRG
header: alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
2021-05-07 15:11:06 LibreELEC anime_downloader.session[1] DEBUG uncached request
2021-05-07 15:11:06 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG https://animesuge.io/ajax/anime/servers?id=653z
2021-05-07 15:11:06 LibreELEC anime_downloader.sites.helpers.request[1] DEBUG /tmp/animedlz_yae6fe/tmptbh850kt
2021-05-07 15:11:06 LibreELEC anime_downloader.sites.anime[1] DEBUG EPISODE IDS: length: 6, ids: ['https://animesuge.io\\"\\/anime\\/my-hero-academia-5-653z\\/ep-1\\"', 'https://animesuge.io\\"\\/anime\\/my-hero-academia-5-653z\\/ep-2\\"', 'https://animesuge.io\\"\\/anime\\/my-hero-academia-5-653z\\/ep-3\\"', 'https://animesuge.io\\"\\/anime\\/my-hero-academia-5-653z\\/ep-4\\"', 'https://animesuge.io\\"\\/anime\\/my-hero-academia-5-653z\\/ep-5\\"', 'https://animesuge.io\\"\\/anime\\/my-hero-academia-5-653z\\/ep-6\\"']
2021-05-07 15:11:06 LibreELEC anime_downloader.commands.dl[1] INFO Found anime: My Hero Academia 5
2021-05-07 15:11:06 LibreELEC anime_downloader.commands.dl[1] INFO Downloading to /downloads
2021-05-07 15:11:06 LibreELEC anime_downloader.sites.anime[1] DEBUG Extracting stream info of id: https://animesuge.io\"\/anime\/my-hero-academia-5-653z\/ep-1\"
Traceback (most recent call last):
  File "/usr/local/bin/anime", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/anime_downloader/cli.py", line 53, in main
    cli()
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/anime_downloader/commands/dl.py", line 140, in command
    for episode in animes:
  File "/usr/local/lib/python3.9/site-packages/anime_downloader/sites/anime.py", line 201, in __iter__
    yield episode_class(ep_id[1], parent=self, ep_no=ep_id[0])
  File "/usr/local/lib/python3.9/site-packages/anime_downloader/sites/anime.py", line 298, in __init__
    try_data()
  File "/usr/local/lib/python3.9/site-packages/anime_downloader/sites/anime.py", line 294, in try_data
    self.get_data()
  File "/usr/local/lib/python3.9/site-packages/anime_downloader/sites/anime.py", line 355, in get_data
    self._sources = self._get_sources()
  File "/usr/local/lib/python3.9/site-packages/anime_downloader/sites/animesuge.py", line 40, in _get_sources
    _id, ep_no = re.search(r".*\/anime\/.*-(.*?)\/.*-(\d+)$", self.url).group(1, 2)
AttributeError: 'NoneType' object has no attribute 'group'
~ #

Dunno what happened, but I swear to god that the day I said it had captcha, it did have captcha, now its long gone or whatever