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] Add thumbnail #14416

Closed
valdeir2000 opened this issue Oct 5, 2017 · 1 comment
Closed

[Facebook] Add thumbnail #14416

valdeir2000 opened this issue Oct 5, 2017 · 1 comment

Comments

@valdeir2000
Copy link

@valdeir2000 valdeir2000 commented Oct 5, 2017

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 2017.10.01. 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 2017.10.01

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

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue

Description of your issue, suggested solution and other information

Hello,

I was testing some options and I found two ways to extract the thumbnail of the video on Facebook.
As I do not work with Python, I'll leave a Shell Script code to assist.

With the user logged off.

curl "https://www.facebook.com/andressoncostaoficial/videos/713796082045907/" | \
grep -Eo "<meta[^>]property=\"og:image\"[^>]*\/>" | \
sed -rn 's/.*content="(.+)".*/\1/p'

With the user logged in.

curl -b "Cookie of the user logged in" "https://www.facebook.com/andressoncostaoficial/videos/713796082045907/" | \
grep -Eo '<img[^>]*class="_4lpf"[^>]*\/>' | \
sed -rn 's/.*src="(.+)".*/\1/p'
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 10, 2017

Thanks for the script! I've added the og:image approach, which will be included in the next version. The _4lpf way does not work here. I guess they constantly change the class name. If you know how to capture the thumbnail for logged-in users, feel free to leave a comment below.

@yan12125 yan12125 closed this in 01c742e Oct 10, 2017
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.