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

issue with Facebook group posts: if a post contains two videos, you can download just the first one #19131

Closed
5 of 9 tasks
hpta opened this issue Feb 4, 2019 · 7 comments
Closed
5 of 9 tasks

Comments

@hpta
Copy link

hpta commented Feb 4, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.01.30.1. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.01.30.1

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

When a group post contains 2 videos you cannot download the second one.
steps to reproduce:

create a facebook group
in the group, start writing a post and upload two videos into it (drag and drop)
confirm
try
youtube-dl -v first_video_url --username "your_email" --password "your_password" -works ok
youtube-dl -v second_video_url --username "your_email" --password "your_password" -it downloads the first video


[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.facebook.com/100033620354545/videos/106560053808006/', '--username', 'PRIVATE', '--password', 'PRIVATE']
[debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250
[debug] youtube-dl version 2019.01.30.1
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: none
[debug] Proxy map: {}
[facebook] Downloading login page
[facebook] Logging in
[facebook] 106560053808006: Downloading webpage
WARNING: unable to extract uploader; 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.
WARNING: unable to extract OpenGraph title; 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.
WARNING: unable to extract thumbnail URL; 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.
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://scontent.fprg2-1.fna.fbcdn.net/v/t66.18014-6/45160005_182968539349636_5214338457739844986_n.mp4?_nc_cat=103&efg=eyJ2ZW5jb2RlX3RhZyI6Im9lcF9oZCJ9&_nc_ht=scontent.fprg2-1.fna&oh=6f75f737734957ab0d285509e4bc42f5&oe=5CE80050'
[download] Destination: Facebook video #106560053808006-106560053808006.mp4
[download] 100% of 471.67KiB in 00:00
...
<end of log>


Description of your issue, suggested solution and other information

@alexvong243f
Copy link
Contributor

Please provide the required username and password, otherwise it is impossible
to download the above videos.

@hpta
Copy link
Author

hpta commented Feb 7, 2019

Edit: deleted credentials because it didn't work
Alright, I created a Facebook account and short videos for testing.
try
youtube-dl.exe https://www.facebook.com/100033620354545/videos/106559927141352/ --username "" --password ""
youtube-dl.exe https://www.facebook.com/100033620354545/videos/106560053808006/ --username "" --password ""

The name of the group is "Pokus group".
First video shows a mouse, the second shows a mug (but you can download just the mouse video)
You can use these credentials to log into Facebook to check this, however Facebook security might be a hassle (suspicious activity based on geographical location or something, I don't know)

@alexvong243f
Copy link
Contributor

alexvong243f commented Feb 7, 2019 via email

@rautamiekka
Copy link
Contributor

You really shouldn't use someone else's Fb acc even if you could login to it cuz Fb has systems in place which will detect an anomaly in the login habits (geo change from country to another, geo change within the country over a long distance, even mere failed attempts to login), which either immediately or later results in the acc getting flagged for security check. If/when Fb has gotten wise, you won't even get outta the check without a consequence or even a ban.

Same for some other sites. In short, don't try it.

@hpta
Copy link
Author

hpta commented Feb 8, 2019

Try it with your facebook account, it should work - I've made the test group public and facebook seems to require just any login for this, so just fill in your credentials.
youtube-dl.exe https://www.facebook.com/100033620354545/videos/106559927141352/ --username "" --password ""
youtube-dl.exe https://www.facebook.com/100033620354545/videos/106560053808006/ --username "" --password ""
You'll get a notification about an unrecognized login though.
Or follow the steps to reproduce in the original post - create your own group post with videos.

@hpta
Copy link
Author

hpta commented Feb 8, 2019

Not sure if it helps but with chrome developer tools I've found that when I'm on the page with the post the div containing these two videos looks like this:

<div class="_2a2q _65sr" style="width:500px; height:500px;"><a rel="theater" ajaxify="/100033620354545/videos/pcb.247600489461589/106559927141352/?type=3&amp;ifg=1&amp;__tn__=HH-R&amp;eid=ARDfn-zaWgSo1vwpI5X0dpfViURnkLtLh4Fpt-lxB-OAEAadaZrRwdl01hLBHacjNUGHbtNJ3M8TZWYE&amp;source=17&amp;player_origin=groups" class="_5dec _xcx _xcy _35sb" href="/100033620354545/videos/pcb.247600489461589/106559927141352/?type=3&amp;ifg=1&amp;__tn__=HH-R&amp;eid=ARDfn-zaWgSo1vwpI5X0dpfViURnkLtLh4Fpt-lxB-OAEAadaZrRwdl01hLBHacjNUGHbtNJ3M8TZWYE" data-render-location="group" id="u_fetchstream_7_1c" style="top:0px; left:0px; width: 249px; height: 500px;"><div class="_5mly _40ja" id="u_fetchstream_7_1o"><div class="_5v-_ _zpr" id="u_fetchstream_7_1p"><div class="_1c_u" id="u_fetchstream_7_1q"><div class="_53j5" style="height:500px;width:249px;" tabindex="0" id="u_fetchstream_7_1r"><video muted="1" height="500" width="249" preload="auto" style="" class="_ox1 _21y0" data-video-width="249" data-video-height="500" data-original-aspect-ratio="1.7777777777778" id="u_fetchstream_7_1s" src="blob:https://www.facebook.com/6e5be04f-58af-4213-adc7-158767ab372a"></video><div class="_4lpe _3htz"><img class="_4lpf" src="https://scontent.fprg2-1.fna.fbcdn.net/v/t15.5256-10/51956584_106560167141328_1021588521455976448_n.jpg?_nc_cat=102&amp;_nc_ht=scontent.fprg2-1.fna&amp;oh=2272a111f7783cf9b4dcc10bc1e43046&amp;oe=5CF31D09"></div><div class="_m54 _1jto _3htz" id="u_fetchstream_7_1t"><img class="_1445 _2sy9 img" src="https://static.xx.fbcdn.net/rsrc.php/v3/y4/r/-PAXP-deijE.gif" alt="" style="background-image: url('https\3a //scontent.fprg2-1.fna.fbcdn.net/v/t15.5256-10/51956584_106560167141328_1021588521455976448_n.jpg?_nc_cat\3d 102\26 _nc_ht\3d scontent.fprg2-1.fna\26 oh\3d 2272a111f7783cf9b4dcc10bc1e43046\26 oe\3d 5CF31D09');" id="u_fetchstream_7_1u"></div><div class="_npo hidden_elem _3htz" id="u_fetchstream_7_1v"><div class="_3drf"></div><div class="_3x62"><div class="_63rn"><div class="_63rm"><div class="_iij">It looks like you may be having problems playing this video. If so, please try restarting your browser.</div><div class="_iir">Close</div></div></div></div></div><i class="_1jto _bsl _4ubd _3htz" id="u_fetchstream_7_1g"><input aria-label="Play video" type="button" class="accessible_elem _5f0v" id="u_fetchstream_7_1w"></i><span class="img _55ym _55yq _55yo _167h _4ubd _1hiu hidden_elem _360f _3htz" aria-busy="true" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuetext="Loading..." id="u_fetchstream_7_1h"></span><div class="_3htz _4ubd _1zmi" id="u_fetchstream_7_1x"></div><div class="_4ivm" id="u_fetchstream_7_1y"></div></div><div class="_2i84"><div id="u_fetchstream_7_1z"></div></div></div></div></div></a><a rel="theater" ajaxify="/100033620354545/videos/pcb.247600489461589/106560053808006/?type=3&amp;ifg=1&amp;__tn__=HH-R&amp;eid=ARCIeRmsgXkwVjh6chsgRU7TFcR3l7-4foH5AcdnxoKJeQBP2EA5sELJd4CwL3qxuakZd3BuWY2nBhH-&amp;source=17&amp;player_origin=groups" class="_5dec _xcx _xcy _35sb" href="/100033620354545/videos/pcb.247600489461589/106560053808006/?type=3&amp;ifg=1&amp;__tn__=HH-R&amp;eid=ARCIeRmsgXkwVjh6chsgRU7TFcR3l7-4foH5AcdnxoKJeQBP2EA5sELJd4CwL3qxuakZd3BuWY2nBhH-" data-render-location="group" id="u_fetchstream_7_1d" style="top:0px; left:251px; width: 249px; height: 500px;"><div class="_5mly _40ja" id="u_fetchstream_7_20"><div class="_5v-_ _zpr" id="u_fetchstream_7_21"><div class="_1c_u" id="u_fetchstream_7_22"><div class="_53j5" style="height:500px;width:249px;" tabindex="0" id="u_fetchstream_7_23"><video muted="1" height="500" width="249" preload="auto" style="" class="_ox1 _21y0" data-video-width="249" data-video-height="500" data-original-aspect-ratio="1.7777777777778" id="u_fetchstream_7_24" src="blob:https://www.facebook.com/aca76e74-b98d-43d5-9ddc-1ab5ebfb3ca4"></video><div class="_4lpe _3htz"><img class="_4lpf" src="https://scontent.fprg2-1.fna.fbcdn.net/v/t15.5256-10/52118694_106560200474658_6011055598336999424_n.jpg?_nc_cat=107&amp;_nc_ht=scontent.fprg2-1.fna&amp;oh=331af870aa6b8de0af5971162df7d525&amp;oe=5CB7B53A"></div><div class="_m54 _1jto _3htz" id="u_fetchstream_7_25"><img class="_1445 _2sy9 img" src="https://static.xx.fbcdn.net/rsrc.php/v3/y4/r/-PAXP-deijE.gif" alt="" style="background-image: url('https\3a //scontent.fprg2-1.fna.fbcdn.net/v/t15.5256-10/52118694_106560200474658_6011055598336999424_n.jpg?_nc_cat\3d 107\26 _nc_ht\3d scontent.fprg2-1.fna\26 oh\3d 331af870aa6b8de0af5971162df7d525\26 oe\3d 5CB7B53A');" id="u_fetchstream_7_26"></div><div class="_npo hidden_elem _3htz" id="u_fetchstream_7_27"><div class="_3drf"></div><div class="_3x62"><div class="_63rn"><div class="_63rm"><div class="_iij">It looks like you may be having problems playing this video. If so, please try restarting your browser.</div><div class="_iir">Close</div></div></div></div></div><i class="_1jto _bsl _4ubd _3htz" id="u_fetchstream_7_1i"><input aria-label="Play video" type="button" class="accessible_elem _5f0v" id="u_fetchstream_7_28"></i><span class="img _55ym _55yq _55yo _167h _4ubd _1hiu hidden_elem _360f _3htz" aria-busy="true" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuetext="Loading..." id="u_fetchstream_7_1j"></span><div class="_3htz _4ubd _1zmi" id="u_fetchstream_7_29"></div><div class="_4ivm" id="u_fetchstream_7_2a"></div></div><div class="_2i84"><div id="u_fetchstream_7_2b"></div></div></div></div></div></a></div>

Search for "href" and you'll get the video urls. In xml viewer this div looks weird - like it isn't properly enclosed. And even with the second video in the foreground you'll get this kind of div with two links. So maybe youtube-dl always matches just the first link when doing its pattern matching (or something like that, I have no idea how it works)

@alexvong243f
Copy link
Contributor

alexvong243f commented Feb 8, 2019 via email

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

No branches or pull requests

3 participants