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

"extractor error" on facebook video #8572

Closed
johnstumbles opened this issue Feb 15, 2016 · 12 comments
Closed

"extractor error" on facebook video #8572

johnstumbles opened this issue Feb 15, 2016 · 12 comments

Comments

@johnstumbles
Copy link

@johnstumbles johnstumbles commented Feb 15, 2016

Attempting to download public video from facebook with youtube-dl on kubuntu (12.04 I think)
I have just done sudo youtube-dl -U and still get the error:

~/Videos/YouTube$ youtube-dl --verbose https://www.facebook.com/bildirchin/videos/970598942987713/
[debug] System config: []
[debug] User config: [u'--output', u'%(title)s [%(extractor)s %(id)s].%(ext)s']
[debug] Command-line args: [u'--verbose', u'https://www.facebook.com/bildirchin/videos/970598942987713/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.02.13
[debug] Python version 2.7.6 - Linux-3.13.0-77-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 11.3-6, avprobe 11.3-6, rtmpdump 2.4
[debug] Proxy map: {}
[facebook] 970598942987713: Downloading webpage
ERROR: An extractor error has occurred. (caused by KeyError(u'instances',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 315, in extract
return self._real_extract(url)
File "/usr/bin/youtube-dl/youtube_dl/extractor/facebook.py", line 189, in _real_extract
for item in server_js_data['instances']:
KeyError: u'instances'
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 666, in extract_info
ie_result = ie.extract(url)
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 321, in extract
raise ExtractorError('An extractor error has occurred.', cause=e)
ExtractorError: An extractor error has occurred. (caused by KeyError(u'instances',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

yan12125 added a commit that referenced this issue Feb 16, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 16, 2016

I got the following message even with an account:

The link you followed may have expired, or the page may only be visible to an audience you're not in.

Could you check again this is a public video?

Nevertheless, correct error messages will be displayed in the next version.

@johnstumbles
Copy link
Author

@johnstumbles johnstumbles commented Feb 16, 2016

I've just checked and the video is still up and it is shown as being public

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 16, 2016

Which browser are you using?

@johnstumbles
Copy link
Author

@johnstumbles johnstumbles commented Feb 16, 2016

Chromium (not Chrome) on Kubuntu
Version 48.0.2564.82 Ubuntu 14.04 (64-bit)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 17, 2016

I still can't access the video. Could you modify line 189 of /usr/bin/youtube-dl/youtube_dl/extractor/facebook.py from

            for item in server_js_data['instances']:

to

            for item in server_js_data.get('instances', []):

And try again?

@johnstumbles
Copy link
Author

@johnstumbles johnstumbles commented Feb 17, 2016

/usr/bin/youtube-dl/ is a file
The only facebook.py I found under /usr is
/usr/lib/python2.7/dist-packages/youtube_dl/extractor/facebook.py
But that file only has 137 lines in it, none of which has the string 'instances' in it
root@nova:/usr/lib/python2.7/dist-packages/youtube_dl/extractor# ls -al facebook.py
-rw-r--r-- 1 root root 5699 Jan 27 2014 facebook.py

youtube-dl -U

youtube-dl is up-to-date (2016.02.13)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 17, 2016

Sorry I misunderstood something. Could you download http://chyen.twbbs.org/downloads/youtube-dl and try the following command:

./youtube-dl --verbose https://www.facebook.com/bildirchin/videos/970598942987713/
@johnstumbles
Copy link
Author

@johnstumbles johnstumbles commented Feb 17, 2016

Hmmm ....
john@nova:/dl/progs/youtube-dl/20160217$ youtube-dl/youtube-dl --verbose https://www.facebook.com/bildirchin/videos/970598942987713/
bash: youtube-dl/youtube-dl: Not a directory
john@nova:
/dl/progs/youtube-dl/20160217$ ./youtube-dl --verbose https://www.facebook.com/bildirchin/videos/970598942987713/
[debug] System config: []
[debug] User config: [u'--output', u'%(title)s [%(extractor)s %(id)s].%(ext)s']
[debug] Command-line args: [u'--verbose', u'https://www.facebook.com/bildirchin/videos/970598942987713/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.02.13
[debug] Python version 2.7.6 - Linux-3.13.0-77-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 11.3-6, avprobe 11.3-6, rtmpdump 2.4
[debug] Proxy map: {}
[facebook] 970598942987713: Downloading webpage
ERROR: The video is not available, Facebook said: "The link you followed may have expired, or the Page may only be visible to an audience that you aren't in."
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 666, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 315, in extract
return self._real_extract(url)
File "./youtube-dl/youtube_dl/extractor/facebook.py", line 199, in _real_extract
expected=True)
ExtractorError: The video is not available, Facebook said: "The link you followed may have expired, or the Page may only be visible to an audience that you aren't in."

I tried it with http://www.downvids.net/ and it said

1st WAY
(not be downloaded due to privacy settings)
Is the video of a friend of yours?. Can you see the video? Follow these instructions to allow the download of the video
Please try 2nd WAY

When I copied the page source into their "2nd WAY" text box it successfully grabbed the video.

There is something a little odd about the video's privacy setting: it is shown as "public" but hovering the mouse over "public" pops up "custom". I have a screenshot but can't see how to attach it ...
... so it's here http://yaph.org.uk/youtube-dl/youtube-dl--fb-video.jpg

Hmm, yes: can't view the video in an incognito window so it looks as if you have to be logged in to facebook to access it.
"Sorry, this content isn't available at the moment
The link you followed may have expired, or the Page may only be visible to an audience that you aren't in."

So it looks as if a way to access it might be what downvids does and have the user pass youtube-dl the page source: is that a facility that already exists within youtube-dl, or could be easily implemented?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 17, 2016

There must be something different in your browser and outside it. What happens if you go to https://www.facebook.com/me in the browser? If you have already logged into Facebook, this link leads to your personal wall, or it asks for login.

@johnstumbles
Copy link
Author

@johnstumbles johnstumbles commented Feb 17, 2016

Yes it does seem to be a logged-in issue - I've added to my comment above

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 17, 2016

Then the following command should work:

./youtube-dl --username USERNAME https://www.facebook.com/bildirchin/videos/970598942987713/

If not, feel free to leave comments and I or others will reopen this issue.

@yan12125 yan12125 closed this Feb 17, 2016
@johnstumbles
Copy link
Author

@johnstumbles johnstumbles commented Feb 17, 2016

Yes that works, thanks.

Will you fix it so it produces a useful error message to clue the user up to what's wrong (e.g. show facebook's error message) and maybe what they need to do (i.e. use --username)?

And thanks for your work on an excellent program!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.