Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ADN extractor #31275

Merged
merged 9 commits into from
Oct 18, 2022
Merged

Fix ADN extractor #31275

merged 9 commits into from
Oct 18, 2022

Conversation

arobase-che
Copy link
Contributor

@arobase-che arobase-che commented Oct 2, 2022

[ADN] Rename Anime Digital Network to Animation Digital Network.

As adverted on the home page: https://animationdigitalnetwork.fr/

Edit: It's not advertised anymore since the 12/10.

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New feature
  • New extractor

Description of your pull request and other information

It's a fix of the extractor. Everything generally work but a few thing need to be updated.

First, to use this extractor, we have to update the URL since ADN rename itself from “Anime” to “Animation”.
Initially, that wasn't the only goal of that PR. But reading the extractor tutorial and testing my code lead to two other commits.

Anime Digital Network se transforme en Animation Digital Network !!
Pensez à mettre à jour votre URL.

That can be translated to :

Anime Digital Network is changing to Animation Digital Network!
Remember to update your URL.

It's exactly what I'm doing.

Fix #31273

Then, I update the test of that extractor since the video used isn't available now.
I did this change because over-wise I fear the PR will not be merged.

And finally, I found that the subtitle key used to decrypt the subtitle was old and must be updated. I did it.

PS: I also updated the test and update the key used to extract subtitle. ^^

@arobase-che
Copy link
Contributor Author

arobase-che commented Oct 2, 2022

The old URL (animedigitalnetwork) can be supported by adjusting the regex but it's only thanks to a redirection and I don't know for how long this redirection will still be made.

[ADN] Rename Anime Digital Network to Animation Digital Network.

As adverted on the home page: https://animationdigitalnetwork.fr/

> Anime Digital Network se transforme en Animation Digital Network !!
> Pensez à mettre à jour votre URL.

That can be translated to :

> Anime Digital Network is changing to Animation Digital Network!
> Remember to update your URL.

It's exactly what I'm doing.

Signed-off-by: ache <[email protected]>
@arobase-che
Copy link
Contributor Author

arobase-che commented Oct 12, 2022

Ok, everything is fine from my side.

It's ready to be merged. 🥳

3 commits, 3 fix :

  1. Fix the name of the extractor (animedigitalnetwork => animationdigitalnetwork). It's a rename from the video provider.
  2. Fix the test. The video used by the test isn't available anymore. I choose one which is available.
  3. Fix the subtitle key. Without that a error will occurre on downloading the subtitle of a video.

@arobase-che arobase-che changed the title Update adn.py to follow the rename Update adn.py to fix that extractor Oct 12, 2022
@arobase-che arobase-che changed the title Update adn.py to fix that extractor Fix ADN extractor Oct 13, 2022
Copy link
Contributor

@dirkf dirkf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Here are some suggestions (untested).

youtube_dl/extractor/adn.py Outdated Show resolved Hide resolved
youtube_dl/extractor/adn.py Outdated Show resolved Hide resolved
youtube_dl/extractor/adn.py Outdated Show resolved Hide resolved
youtube_dl/extractor/adn.py Outdated Show resolved Hide resolved
arobase-che and others added 2 commits October 15, 2022 23:26
* process HTTP error text (eg geo-block) correctly and uniformly in Py3, Py2
* but then skip test for CI since geo-blocked
@arobase-che
Copy link
Contributor Author

Oh I'm sorry. I tried the test from France so it just worked.

@dirkf dirkf merged commit 447edc4 into ytdl-org:master Oct 18, 2022
@dirkf
Copy link
Contributor

dirkf commented Oct 18, 2022

No problem, just a bit of final QA!

github-actions bot added a commit to hellopony/youtube-dl that referenced this pull request Oct 18, 2022
alxlive pushed a commit to alxlive/youtube-dl that referenced this pull request Feb 27, 2023
* Rename Anime Digital Network to Animation Digital Network, animationdigitalnetwork.fr
* Update the test to an available video
* Update the decoding key of subtitles
* Keep the support of old URLs
* Add a test to match the old URL
* Reduce redundancy of the URL name
* Fix md5 ^^"
* Fix undefined _BASE
* Process HTTP error text (eg geo-block) correctly and uniformly in Py3, Py2
* Skip test for CI since geo-blocked

Signed-off-by: ache <[email protected]>
Co-authored-by: dirkf <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download [https://animationdigitalnetwork.fr] Videos
2 participants