Skip to content

Releases: tamarasaurus/contract-scraper

v6.0.0

22 Jul 11:37
43eb4ba
Compare
Choose a tag to compare

What's Changed

Full Changelog: v5.0.0...v6.0.0

v5.0.0

22 Jul 09:34
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.0.1...v5.0.0

v4.0.1

03 Jun 17:19
67bc4a8
Compare
Choose a tag to compare

Puppeteer improvements:

  • When initialising a scraper you can now pass launch options to puppeteer
const scraper = new Scraper('http://website.com', contract, { headless: false })

See the full list of options here.

  • You can now ask puppeteer to wait for a selector to exist in the DOM before scraping the page
const scraper = new Scraper('http://website.com', {
  itemSelector: 'li',
  waitForPageLoadSelector: 'ul', 
  puppeteer: true
  attributes: {
    name: {
      type: 'text',
      selector: '.name'
    },
  }
})
  • Bug fix: logic error in selecting the fetcher based on the puppeteer contract attribute has been fixed

v3.2.0

10 May 20:17
Compare
Choose a tag to compare

Update dependencies

v3.1.1

07 May 16:18
Compare
Choose a tag to compare

Expose a new function in Scraper getPageContents which returns:

{
  page: {
    contents: 'html contents',
    encoding: 'utf-8'
    url: 'http://page-url.com'
  },
  $: CheerioStatic object
}

v3.1.0

19 Apr 16:15
Compare
Choose a tag to compare

Add an option to use axios as a fetcher with puppeteer:false in scraping contracts

v3.0.2

19 Apr 14:46
Compare
Choose a tag to compare

Make schema more flexible

v3.0.1

19 Apr 14:33
Compare
Choose a tag to compare

Make selector in contract optional

v3.0.0

19 Apr 14:17
Compare
Choose a tag to compare
  • Turn attributes from classes to functions
  • Add schema validation for contracts
  • Rename digit to number

v2.0.1

18 Apr 13:23
Compare
Choose a tag to compare

Updates