![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@viclafouch/fetch-crawler
Advanced tools
Distributed crawler powered by Fetch Crawler
Fetch Crawler is designed to provide a basic, flexible and robust API for crawling websites.
The crawler provides simple APIs to crawl these static websites with the following features:
# npm i @viclafouch/fetch-crawler
Note: Fetch Crawler does not contain Puppeteer. It using the fetch-node module.
import FetchCrawler from '@viclafouch/fetch-crawler'
// I use Cheerio to get the content of the page
// See https://cheerio.js.org
const collectContent = $ =>
$('body')
.find('h1')
.text()
.trim()
// After getting content of the page, do what you want :)
// Accept async function
const doSomethingWith = (content, url) => console.log(`Here the title '${content}' from ${url}`)
// Here I start my crawler
// You can await for it if you want
FetchCrawler.launch({
url: 'https://github.com',
evaluatePage: $ => collectContent($),
onSuccess: ({ result, url }) => doSomethingWith(result, url),
onError: ({ error, url }) => console.log('Whouaa something wrong happened :('),
maxRequest: 20
})
This crawler is built on top of node-fetch.
Puppeteer is a project from the Google Chrome team which enables us to control a Chrome (or any other Chrome DevTools Protocol based browser) and execute common actions, much like in a real browser. Fetch Crawler is a static crawler based on simple requests to HTML files. So it will be difficult to scrap the contents when the HTML dynamically changes on browsers.
Fetch Crawler is currently supported by the Node Foundation.
Currently supported versions:
Any contributions and/or pull requests would be welcome.
Copyright (c) 2019, Victor de la Fouchardiere.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FAQs
A Node.JS Web crawler using the API Fetch
The npm package @viclafouch/fetch-crawler receives a total of 2 weekly downloads. As such, @viclafouch/fetch-crawler popularity was classified as not popular.
We found that @viclafouch/fetch-crawler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.