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

facebook extractor misleading reports missing login information #25709

Open
marcello-pietrobon opened this issue Jun 17, 2020 · 6 comments
Open

facebook extractor misleading reports missing login information #25709

marcello-pietrobon opened this issue Jun 17, 2020 · 6 comments

Comments

@marcello-pietrobon
Copy link

@marcello-pietrobon marcello-pietrobon commented Jun 17, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.06.16.1
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.8.2 (CPython) - Linux-5.4.0-37-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2
[debug] Proxy map: {}
[facebook] 3058694450820098: Downloading webpage
[facebook] 3058694450820098: Downloading webpage
ERROR: This video is only available for registered users. Use --username and --password or --netrc to provide account credentials.
Traceback (most recent call last):
File "lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
ie_result = ie.extract(url)
File "lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 482, in _real_extract
_, info_dict = self._extract_from_url(
File "lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 351, in _extract_from_url
self.raise_login_required()
File "lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 934, in raise_login_required
raise ExtractorError(
youtube_dl.utils.ExtractorError: This video is only available for registered users. Use --username and --password or --netrc to provide account credentials.

urls = ['https://www.facebook.com/groups/794657180557181/permalink/3058694450820098/']

Description

The problem is that pages in facebook with 'permalinks' in their urls are not
parsed correctly, and this ends up into a call to
youtube_dl/extractor/facebook.py line 351
self.raise_login_required()
it is true that the webpage contains '>You must log in to continue',
but still it's not actually true that you need to login, as this depends on
the redirection url.

BTW, I've done the correct parsing, but I'm hesitant to commit the fix,
as I don't know policies here enough and it also requires changes in
the facebook._real_extract() method in order to handle a redirection.

And if the redirection points to a video on a different platform, then
the fix (which I made it for myself) is even more complex as it has to
go all the way up to the YoutubeDL.download(self, url_list) function.

@selfisekai
Copy link

@selfisekai selfisekai commented Jun 30, 2020

example broken url: https://www.facebook.com/344833409224708/posts/1140962959611745/

youtube-dl should follow this url from the response: <link rel="canonical" href="https://www.facebook.com/344833409224708/videos/wyobra%C5%BA-sobie-polsk%C4%99-swoich-marze%C5%84/971136989973262/" />, which works

@kartagis
Copy link

@kartagis kartagis commented Jul 3, 2020

youtube-dl https://www.facebook.com/strajkobywatelskiPolska/videos/971136989973262/ worked for me.

@kartagis
Copy link

@kartagis kartagis commented Jul 3, 2020

I suffer from the very same issue.

@abcdefg30
Copy link

@abcdefg30 abcdefg30 commented Jul 4, 2020

What worked for me (using Firefox) was to right click on a video that had this issue and select "Show video URL", and then copy and use that.

@kartagis
Copy link

@kartagis kartagis commented Jul 4, 2020

@Tyilo
Copy link

@Tyilo Tyilo commented Sep 28, 2020

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
5 participants
You can’t perform that action at this time.