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

2.0.0 #40

Closed
4 of 5 tasks
Kikobeats opened this issue Dec 10, 2017 · 2 comments
Closed
4 of 5 tasks

2.0.0 #40

Kikobeats opened this issue Dec 10, 2017 · 2 comments
Labels
Milestone

Comments

@Kikobeats
Copy link
Member

Kikobeats commented Dec 10, 2017

We are working on a v2 iteration.

TODO

  • Close all issues related with HTTP problems.
  • Migrate documentation.
  • Update dependencies.
  • Migrate benchmark.
  • Add contributor guidelines.

Breaking Changes

The major breaking changes in this new version are that HTTP layers are moved out of the library.

From now, metascraper will be a main function that receives HTML and URL for extracting the data:

const metascraper = require('metascraper')
const got = require('got')

const targetUrl = 'http://www.bloomberg.com/news/articles/2016-05-24/as-zenefits-stumbles-gusto-goes-head-on-by-selling-insurance'

;(async () => {
  const {body: html, url} = await got(targetUrl)
  const metadata = await metascraper({html, url})
  console.log(metadata)
})()

Because this iteration refactor a lot of code, is not possible create a PR, so I'm going to use this issue as a tracking list of things to close before release the new version.

Improvements

  • Add new logo field.
  • Updated tests, now with at least top50 popular internet sites.
  • The codebase was simplified and ready for supporting plugins in 3.0.0.
@bkniffler
Copy link

Any example of how to use rules?

@Kikobeats
Copy link
Member Author

@bkniffler hey, I opened a PR right now to define a way to extend rules, can you feedback me about that?

#41

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

No branches or pull requests

2 participants