feller-prj / extractor-project

forked from iaextractor
Other
73 stars 21 forks source link

extension does not work #35

Open ghost opened 3 years ago

ghost commented 3 years ago

I use windows 10 x64 20h2 and firefox devloper editon x64 82.0b9. After installing and watching any youtube video, extension does not work at all. Never worked. Untitled

patfla commented 3 years ago

The extension was working for me but auto update from FF 81.0.1 to 81.0.2 on Win7 broke things. Something to the effect of "pathname not recognized." Yes, per ycombinator news, I understand that things are, uh, afoot.

Thought I could go back a couple of versions and downloaded the Aug. 1 Nighly 81.0a1 from ftp. Turned off auto updates and the version seems to be sticking (not auto uploading to the latest) but extractor seems still not to work with message below:

"can't access property "startsWith", pathname is undefined."

patfla commented 3 years ago

Git cloned the code and searched. 'startsWith' seems to appear only in two ffmpeg-related files and found (options) that while I had the native client installed, ffmpeg itself was not installed. Installed but didn't help.

It's been a while since I've done browser debugging. Where in the FF debugger do I find the code for the extractor? Meaning generally I suppose, addons?

patfla commented 3 years ago

about:debugging then Inspect Video DownloadHelper gets to me to VDH code - but not in the context of a page targeted to youtube. I search and find a startsWith at the beginning of download.get that seems a likely candidate and set a breakpoint there. I don't fully expect it to work since that would be in two separate tabs but go to youtube and invoke VDH on a video. Doesn't break. Hmm.

I also note though the code in the brower differs from what I git cloned.

Browser (common.js):

      download.get(request, prefs, progress).then(ds => {
        const vd = ds.length === 1 ? ds[0] : (ds.filter(o => o.mime.startsWith('video')).shift() || ds[0]);

git cloned code:

      download.get(request, prefs).then(
        ds => {
          const vInfo = ds.filter(d => d.dash !== 'a').shift() || ds[0];
          const aInfo = ds.filter(d => d !== vInfo).shift();

Hmm. Does the browser install (from my Mozilla acct) install a different version?

patfla commented 3 years ago

OK figured that out. Zip -r the github code and change .zip to .xpi then substitute for the VDH xpi that's in the current profiles extensions directory and now the code in browser debugger agrees. Seems likely what I was getting was the 'original' VDH with the name (I think) Guttierez attached.

However, still doesn't work and throws the same path not found err.

patfla commented 3 years ago

Note that there are solutions elsewhere on github that do work - including, at present. I'll be no more specific than that.

Markyparky56 commented 3 years ago

Should be noted the latest version listed on this repo is 0.9.3, whereas the version listed on the Firefox Addons page is 1.0.9. Whatever code is available here is 6 months old.

Looking at the Dev Console when trying to download a video shows this error (and callstack):

TypeError: pathname is undefined
    resolve moz-extension://584a6551-5cf7-413f-9347-32b5d9b2f58a/data/inject/youtbe-dl/require.js:87
    getInfo moz-extension://584a6551-5cf7-413f-9347-32b5d9b2f58a/data/inject/youtbe-dl/vendor/info.js:227

These files are not in this repo.

If you want to go digging through the current code you need to unzip the .xpi file in your extensions folder (should be the 155KB one). From there, it seems something it fouling up in require.js, best guess line 79, though line 87 also includes your startsWith which I'm not seeing on my end.

Sorry I can't offer more insight right now, this code is pretty opaque and uncommented so deciphering it isn't going to be quick. Current thoughts are that the info.html5player param passed in in getInfo (info.js:227) is null, so whatever method is used to retrieve that has got borked.

That all said, theres a ReadMe in the "youtbe-dl" folder which points at https://github.com/fent/node-ytdl-core (tagged at v3.4.1) but the repo has just hit Release 4.0. It's possible we may see an update to the extension is the coming days/weeks which integrates this new version.

patfla commented 3 years ago

Thanks. Yes, I can see the code (now) in FF's debugger (and step through it). Since it's very different from what's in this repo, I suppose the question is: just where did it come from? Downloaded by FF I suppose but where is that stored?

Meanwhile though, I have something else, from github, that's worked, so far, reliably.

patfla commented 3 years ago

I don't see the extension - in the youtube page itself - in the FF debugger with 82.0.2 - but I do see it with 81.0a1 - why? Ah I think now I know why

https://imgur.com/a/Of4y05d

So I assume I need to figure out how to debug the extension as a persistent background page.

JarieSuisen commented 3 years ago

I've been using the latest release, 1.0.9, and it's fully unusable, giving the same "pathname is undefined" note instead of listing download options. Is there likely to be an update that gets it working again? It doesn't seem like there's much of a good alternative I'm finding...

Markyparky56 commented 3 years ago

Latest version "Version 1.1.2" fixes this issue, repository still not up-to-date.