wikimedia / html-metadata

MetaData html scraper and parser for Node.js (supports Promises and callback style)
MIT License
165 stars 44 forks source link

Relative URLs #74

Open kevinahuber opened 6 years ago

kevinahuber commented 6 years ago

OG allows for image URLs that are relative paths. The debugger automatically prepends the domain to relative paths.. I've seen this done with other metadata as well.. whether it is specifically allowed in a spec or not. It would be helpful for this package to identify and replace those cases. Is it within the scope of this package to cover that? If so, I am happy to make a contribution!

mvolz commented 6 years ago

I think that sounds good! I think it should be made optional (i.e. in the individual methods, if the url is added as a second arg, then use it create the full urls, but if not, just include the relative paths).