Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@democracy-deutschland/dip21-scraper

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@democracy-deutschland/dip21-scraper - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

7

distribution/DipBrowser.js

@@ -12,2 +12,3 @@ 'use strict';

const request = require('request');
const UserAgent = require('user-agents');

@@ -38,4 +39,8 @@ class DipBrowser {

const headers = {
'User-Agent': new UserAgent()
};
return new Promise((resolve, reject) => {
request(reqOptions, (error, res, body) => {
request(_extends({}, reqOptions, { headers }), (error, res, body) => {
if (!error && res.statusCode === 200) {

@@ -42,0 +47,0 @@ resolve({ res, body });

3

distribution/scraper.js

@@ -336,3 +336,3 @@ 'use strict';

id: vorgangId.split('-')[1],
url: `/dip21.web/searchProcedures/simple_search_list.do?selId=${vorgangId.split('-')[1]}&method=select&offset=0&anzahl=${_this.options.resultsPerPage}&sort=3&direction=desc`,
url: `/dip21.web/searchProcedures/simple_search_list.do?selId=${vorgangId.split('-')[1]}&method=select&offset=0&anzahl=200&sort=3&direction=desc`,
scraped: false

@@ -356,2 +356,3 @@ });

newFormData.method = '>'; // Next page can only be reached through this
newFormData.offset = (i - 1) * _this.options.resultsPerPage;
const { body: tmpBody } = yield browser.browser.getSearchResultPage({

@@ -358,0 +359,0 @@ formMethod: newFormMethod,

{
"name": "@democracy-deutschland/dip21-scraper",
"version": "0.1.6",
"version": "0.1.7",
"description": "scraper for the german \"Bundestag\"",

@@ -33,2 +33,3 @@ "main": "distribution/scraper.js",

"request-cookies": "^1.1.0",
"user-agents": "^1.0.539",
"x2js": "^3.1.1"

@@ -35,0 +36,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc