snarfed / huffduff-video

📺 Extract the audio from videos on YouTube, Vimeo, and other sites and send it to Huffduffer.
https://huffduff-video.snarfed.org/
95 stars 6 forks source link

Youtube broken again #32

Closed albill closed 6 years ago

albill commented 6 years ago

Attempting to snarf Youtube content just now, I receive the following error:

**ERROR: Unsupported URL: https://www.youtube.com/

Here are the supported sites. If this site isn't supported, it may also post its videos on YouTube. Try there!**

albill commented 6 years ago

Interestingly, if I go to http://huffduff-video.snarfed.org and enter the Youtube URL manually, it works but not if I use the bookmarklet for huffduffer, which has the properties:

javascript:var%20w=window.open('https://huffduffer.com/add?popup=true&page='+encodeURIComponent(location.href),'huffduff','scrollbars=1,status=0,resizable=1,location=0,toolbar=0,width=360,height=480');

snarfed commented 6 years ago

hey al, sorry for the trouble! hmm, i use that same bookmarklet. i tried it on a youtube video just now, and it worked fine. what's the youtube url you got that error on? was it working for you before? do you know when it stopped working?

(i don't run huffduffer itself, so i may not be able to help much, but we can see.)

albill commented 6 years ago

I tried it on https://www.youtube.com/watch?time_continue=971&v=w5bbJcimCcs (and it failed when I tried it again via the bookmarklet).

snarfed commented 6 years ago

thanks! looks like a bug in the server side of huffduffer's bookmarklet.

hey @adactio, when the huffduffer bookmarklet redirects to huffduff-video for a URL, it doesn't url-encode the URL, so it breaks on &s. mind adding that to the backend?

specifically, this huffduffer URL:

https://huffduffer.com/add?popup=true&page=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Ftime_continue%3D971%26v%3Dw5bbJcimCcs

302 redirects (in a browser logged into huffduffer) to:

http://huffduff-video.snarfed.org/get?url=https://www.youtube.com/watch?time_continue=971&v=w5bbJcimCcs

note the unescaped ? and &.

thanks in advance!

adactio commented 6 years ago

Ah, thanks for the heads-up! I'll look into this...

adactio commented 6 years ago

Right, I think I’ve got this working now. @albill Can you try huffduffing that link again? If all is well, this ticket can be closed.

albill commented 6 years ago

I tried it on that one and then a new one in the same format, https://www.youtube.com/watch?time_continue=971&v=HQLW4VvVQC0 , and both worked.