Closed StevenC4 closed 1 year ago
can confirm the PR fixes the bug with gogoanime.
Nice catch, thank you!
Alright, I have removed the startswith
. My PR now simply modifies the existing code so we're not appending https:
to the front. Is this what you were requesting?
Yep, this should be good.
I didn't realize when I was writing up this PR - should I have bumped the patch version of the package like was done in this commit, or do you have a separate or automated process for that?
Don't worry about that, there are a few staged changes before bumping is all.
Overview
I recently encountered a bug that breaks the
animdl grab
andanimdl download
scripts for thegogoanime
provider.To reproduce this bug, run
animdl grab "Megami no cafe"
oranimdl download "Megami no cafe"
.The following is a screenshot of the output of
animdl grab "Megami no cafe"
:I pulled the repo, and in debugging the issue, I noticed that the
get_embed_page
function in thegogoanime
provider is breaking the URL by adding an additionalhttps:
to the front of the URL it is grabbing from the iframe on the page.Testing
Prior to the changes from this pull request, the
get_embed_page
function was returning a URL that looked like this:After making the changes in this pull request, the
get_embed_page
function now returns the URL as follows:After making the change, I tested the
download
andgrab
functions, and they work now.Considerations
I noticed this bug recently (within the last two weeks). My assumption is that the there was a recent change to the format of the page that is being parsed. Presumably, before the bug started occurring, the URL parsed from the iframe was missing the
https:
from the front, but thehttps:
is now being included.I updated the code to conditionally add an
https:
to the front of the URL if it is missing. I opted for the conditional logic in case this was not a widespread change; I want to make sure this works with the old format and the new format in case there are still some pages that are missing thehttps:
from the front of the URL.Let me know if you have any concerns about this approach.