laurengarcia / url-metadata

NPM module: Request a url and scrape the metadata from its HTML using Node.js or the browser.
https://www.npmjs.com/package/url-metadata
MIT License
167 stars 44 forks source link

unable to scrap image from the below url #9

Closed 2007ay closed 5 years ago

2007ay commented 6 years ago

Hi Guys,

First of all thank you very much for this amazing work. I am facing one issue to scrap meta og:image from the below mention URL

https://finance.yahoo.com/news/passenger-dies-boston-bound-united-164546412.html

the og:image which truncated https://s.yimg.com/uu/api/res/1.2/xZ2FcgWSxDeKhchPxVEtjA--~B/aD02ODI7dz0xMDI0O3NtPTE7YXBwaWQ9eXRhY2h5b24-/http://media.zenfs.com/en-US/homerun/fortune_175/abd8f21e89363e43b2babd33af71da3e

When I debug the code and found the problem is https://github.com/LevelNewsOrg/url-metadata/blob/master/lib/clean.js here

Can you please help to fix this issue? we can't use ensureSecureImageRequest options since its always true.

laurengarcia commented 5 years ago

Fixed and published on npm, version 2.1.9

Bugfix here: https://github.com/LevelNewsOrg/url-metadata/commit/7d15d538e878d918aaa822bdb84a978b4106c96d