Permalink
Browse files

Unify browserless instance

  • Loading branch information...
Kikobeats committed Jun 29, 2018
1 parent 0bd4ab2 commit e7ef6a901576ba8248126c1b6126b8e186e89539
Showing with 4 additions and 12 deletions.
  1. +0 −5 bin/cli/browserless.js
  2. +1 −3 bin/cli/extract-urls.js
  3. +1 −2 bin/cli/index.js
  4. +2 −2 package.json

This file was deleted.

Oops, something went wrong.
@@ -6,12 +6,10 @@ const getHTML = require('html-get')
const cheerio = require('cheerio')
const { map } = require('lodash')
const browserless = require('./browserless')
const { isXmlUrl } = fromXML
const fromHTML = async (url, { selector, prerender, ...opts }) => {
const { html: rawHtml } = await getHTML(url, { browserless, prerender })
const { html: rawHtml } = await getHTML(url, { prerender })
const $ = cheerio.load(rawHtml)
const html = selector ? $(selector).html() : rawHtml
const urls = await getUrlsFromHtml({ url, html, ...opts })
@@ -10,7 +10,6 @@ const { ci } = require('ci-env')
const extractUrls = require('./extract-urls')
const renderError = require('./render-error')
const browserless = require('./browserless')
const pkg = require('../../package.json')
const getError = require('./get-error')
const getUrl = require('./get-url')
@@ -92,7 +91,7 @@ const cli = require('meow')(require('./help'), {
await build.start()
const urls = await extractUrls(url, opts)
const emitter = await urlint(urls, { browserless, ...opts })
const emitter = await urlint(urls, opts)
view({ total: size(urls), emitter, ...opts })
} catch (genericError) {
const error = getError(genericError)
@@ -32,14 +32,14 @@
"validate"
],
"dependencies": {
"@urlint/core": "~1.3.1",
"@urlint/core": "~1.3.2",
"chalk": "~2.4.1",
"cheerio": "~1.0.0-rc.2",
"ci-env": "~1.6.1",
"clean-stack": "~1.3.0",
"cosmiconfig": "~5.0.5",
"github-build": "~1.2.0",
"html-get": "~1.0.3",
"html-get": "~1.0.6",
"html-urls": "~2.0.0",
"lodash": "~4.17.10",
"meow": "~5.0.0",

0 comments on commit e7ef6a9

Please sign in to comment.