Giter VIP home page Giter VIP logo

Comments (12)

InVermont avatar InVermont commented on July 17, 2024

Same here. Example: www.youtube.com/watch?v=vUKh1HDz4OU
but seems to happen with all videos.

from youtubeextractor.

RichTeaMan avatar RichTeaMan commented on July 17, 2024

I came across the problem too. It appears that the ExtractDownloadUrls method in the DownloadResolver class was looking for a 'signatures' query in a youtube url. This query is no longer present so an exception is thrown. If you change the ExtractDownloadUrls method to not use signatures the rest of the process goes without a hitch. The modified method goes as follows:

    private static IEnumerable<Uri> ExtractDownloadUrls(string source)
    {
        string urlMap = HttpHelper.ParseQueryString(source)["url_encoded_fmt_stream_map"];

        string[] splitByUrls = urlMap.Split(',');

        foreach (string s in splitByUrls)
        {
            IDictionary<string, string> queries = HttpHelper.ParseQueryString(s);
            string url = string.Format("{0}&fallback_host={1}", queries["url"], queries["fallback_host"])

            url = HttpHelper.UrlDecode(url);
            url = HttpHelper.UrlDecode(url);

            yield return new Uri(url);
        }
    }

I'm reluctant to submit a pull request because I have no idea what this code did before and if it may be important in some other cases, but it certainly did the trick for me.

from youtubeextractor.

xearman2 avatar xearman2 commented on July 17, 2024

thank you, i'll try this code

from youtubeextractor.

InVermont avatar InVermont commented on July 17, 2024

awesome. I'll give it a shot

Thanks!

Mike

On Sun, Mar 2, 2014 at 4:59 PM, Thomas Holmes [email protected]:

I came across the problem too. It appears that the ExtractDownloadUrls
method in the DownloadResolver class was looking for a 'signatures' query
in a youtube url. This query is no longer present so an exception is
thrown. If you change the ExtractDownloadUrls method to not use signatures
the rest of the process goes without a hitch. The modified method goes as
follows:

private static IEnumerable<Uri> ExtractDownloadUrls(string source)
{
    string urlMap = HttpHelper.ParseQueryString(source)["url_encoded_fmt_stream_map"];

    string[] splitByUrls = urlMap.Split(',');

    foreach (string s in splitByUrls)
    {
        IDictionary<string, string> queries = HttpHelper.ParseQueryString(s);
        string url = string.Format("{0}&fallback_host={1}", queries["url"], queries["fallback_host"])

        url = HttpHelper.UrlDecode(url);
        url = HttpHelper.UrlDecode(url);

        yield return new Uri(url);
    }
}

I'm reluctant to submit a pull request because I have no idea what this
code did before and if it may be important in some other cases, but it
certainly did the trick for me.

Reply to this email directly or view it on GitHubhttps://github.com//issues/45#issuecomment-36468748
.

from youtubeextractor.

simetrio avatar simetrio commented on July 17, 2024

RichTeaMan code works fine!!!

Thanks!!!

from youtubeextractor.

RichTeaMan avatar RichTeaMan commented on July 17, 2024

Should this be closed? No one has commited this code, nor has anyone who knows what the signature query originally did offered any explanation.

from youtubeextractor.

flagbug avatar flagbug commented on July 17, 2024

Hey guys, the sig parameter is used if the signature is encrypted. The problem is, I haven't found a way to decrypt this signature yet.

youtube-dl has the code to decrypt it, I even tried to port the code from Python to C#, but I wasn't successful.

from youtubeextractor.

InVermont avatar InVermont commented on July 17, 2024

I think the problem started happening for non-encrypted videos.
I was certainly getting it on every video, regardless.

I'm going to assume the code suggestions from RichTeaMan fixed the issue for non-encrypted ones (I have yet to try... been busy). I assume the ones where the signature is encrypted are still affected.

from youtubeextractor.

flagbug avatar flagbug commented on July 17, 2024

I assume sometimes the adaptive_fmts query isn't existing and it isn't an issue with the signature

from youtubeextractor.

InVermont avatar InVermont commented on July 17, 2024

Ok, I can confirm some of my wandering speculation.
using the code changes from RichTeaMan

I can download
Cosmic Rays Mystery Solved - Sixty Symbols (assuming not encrypted)
http://www.youtube.com/watch?v=aTBvPxQIFts

but not

Katy Perry - Last Friday Night (Vivo, assuming it is encrypted)
http://www.youtube.com/watch?v=KlyXNRrsk4A

from youtubeextractor.

scytalezero avatar scytalezero commented on July 17, 2024

RichTeaMan's patch worked to get me back up and running. I owe him a big thank you!

I couldn't download encrypted (Vevo) videos even before this latest change, so it's no loss for me.

from youtubeextractor.

flagbug avatar flagbug commented on July 17, 2024

Oh, I think I know what's going on, I fixed this 2 months ago in 24f7168 but haven't released a new version with this fix yet.

Could you try building from source and see if this fixes it?

from youtubeextractor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.