@democracy-deutschland/dip21-scraper
Advanced tools
Comparing version 0.0.3 to 0.1.0
@@ -164,3 +164,3 @@ 'use strict'; | ||
const re = /<a.*?class="linkIntern".*?href="(.*?)">.*?<\/a>.*?<\/td><td>([0-9]*.[0-9]*.[0-9]*)<\/td>/g; | ||
const re = /<a.*?class="linkIntern".*?href="(.*?)">(?:.|\s)*?<\/a>(?:.|\s)*?<\/td><td>([0-9]*.[0-9]*.[0-9]*)<\/td>/g; | ||
let m; | ||
@@ -167,0 +167,0 @@ const data = []; |
@@ -95,3 +95,3 @@ 'use strict'; | ||
}) !== -1) { | ||
const hasError = false; | ||
let hasError = false; | ||
const filterIndex = _this.filters.findIndex(function ({ scraped }) { | ||
@@ -123,6 +123,7 @@ return !scraped; | ||
} catch (error) { | ||
hasError = true; | ||
_this.options.logError({ error }); | ||
_this.filters[filterIndex].scraped = false; | ||
_this.stack[browserIndex].errors += 1; | ||
_this.options.logUpdateSearchProgress(_extends({}, _this.status, { hasError: true })); | ||
_this.options.logUpdateSearchProgress(_extends({}, _this.status, { hasError })); | ||
@@ -424,4 +425,5 @@ yield _this.timeout(); | ||
}) !== -1) { | ||
const hasError = false; | ||
let hasError = false; | ||
if (!_this3.stack[browserIndex].browser) { | ||
hasError = true; | ||
_this3.options.logUpdateDataProgress({ | ||
@@ -431,3 +433,3 @@ value: _this3.completedLinks, | ||
browsers: _this3.stack, | ||
hasError: true | ||
hasError | ||
}); | ||
@@ -479,2 +481,3 @@ yield _this3.timeout(); | ||
_this3.stack[browserIndex].errors += 1; | ||
hasError = true; | ||
_this3.options.logUpdateDataProgress({ | ||
@@ -484,3 +487,3 @@ value: _this3.completedLinks, | ||
browsers: _this3.stack, | ||
hasError: true | ||
hasError | ||
}); | ||
@@ -487,0 +490,0 @@ |
{ | ||
"name": "@democracy-deutschland/dip21-scraper", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "scraper for the german \"Bundestag\"", | ||
@@ -5,0 +5,0 @@ "main": "distribution/scraper.js", |
271765
863