Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

wrong imageUrl in youtube url's #50

Open
mufumbo opened this issue Sep 2, 2016 · 2 comments
Open

wrong imageUrl in youtube url's #50

mufumbo opened this issue Sep 2, 2016 · 2 comments

Comments

@mufumbo
Copy link

mufumbo commented Sep 2, 2016

This happens whenever you fetch an Youtube link like:
https://www.youtube.com/watch?v=1a6KjDmHbR4

Instead of using the "og:image" from the head, it's setting the imageUrl as the first image in the , so in the provided example url, it's getting "https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" instead of the og:image that is the correct one: "https://i.ytimg.com/vi/1a6KjDmHbR4/maxresdefault.jpg"

Is there a work around this?

@karussell
Copy link
Owner

Not that I know. You would have to look in the sources and provide a pull request for this.

@mufumbo
Copy link
Author

mufumbo commented Sep 13, 2016

@karussell snacktory picks blindly the first <img of the page as the the page imageUrl.

A better approach would probably be to use the provided "og:image" instead.

Not sure I would be able to dig into the code to fix this, but I definitely miss the actual HTML result to be available on the "HtmlFetcher" class, so I could quickly hack a fix to get the og:image using Jsoup.

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

No branches or pull requests

2 participants