wikimedia / html-metadata

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

Adds JSON-LD functions #50

Closed ethanlee16 closed 7 years ago

ethanlee16 commented 7 years ago

Closes #39, T148837.

ethanlee16 commented 7 years ago

Looks like two of the Travis checks failed due to HTTP error retrieving https://www.uber.com/en-GB - could we write a script to pull in snapshots of websites to store in /test instead of fetching for each test? It might make testing more deterministic and reliable, avoiding issues like this.

ethanlee16 commented 7 years ago

The function now fails silently on malformed JSON, only throwing if there are no valid JSON-LD tags on the page. The failing check above is also a result of a timeout, this time as a result of a different test. ¯_(ツ)_/¯

mvolz commented 7 years ago

Whoops, forgot to mention that you should also tick the version number up in package.json as per http://semver.org/

mvolz commented 7 years ago

Looks like the Uber ones are still timing out, probably we should just remove those?

ethanlee16 commented 7 years ago

Done - replaced Uber with Apple and it's passing tests! 😄