New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

duck-duck-scrape

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duck-duck-scrape - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

6

CHANGELOG.md

@@ -8,2 +8,5 @@ # Changelog

## [Unreleased]
## [2.2.5] - 2023-12-04
### Fixed:
- Added request anomaly detection ([#135](https://github.com/Snazzah/duck-duck-scrape/issues/135))
## [2.2.4] - 2023-05-11

@@ -60,3 +63,3 @@ ### Fixed:

[Unreleased]: https://github.com/Snazzah/duck-duck-scrape/compare/v2.2.4...HEAD
[Unreleased]: https://github.com/Snazzah/duck-duck-scrape/compare/v2.2.5...HEAD
[1.0.3]: https://github.com/Snazzah/duck-duck-scrape/releases/tag/v1.0.3

@@ -76,1 +79,2 @@ [2.0.0]: https://github.com/Snazzah/duck-duck-scrape/compare/v1.0.3...v2.0.0

[2.2.4]: https://github.com/Snazzah/duck-duck-scrape/compare/v2.2.3...v2.2.4
[2.2.5]: https://github.com/Snazzah/duck-duck-scrape/compare/v2.2.4...v2.2.5

@@ -79,2 +79,4 @@ "use strict";

throw new Error('A server error occurred!');
if (response.body.toString().includes('DDG.deep.anomalyDetectionBlock'))
throw new Error('DDG detected an anomaly in the request, you are likely making requests too quickly.');
const searchResults = JSON.parse(SEARCH_REGEX.exec(response.body)[1].replace(/\t/g, ' '));

@@ -81,0 +83,0 @@ // check for no results

2

package.json
{
"name": "duck-duck-scrape",
"version": "2.2.4",
"version": "2.2.5",
"description": "Search from DuckDuckGo and use it's spice APIs.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -165,2 +165,4 @@ import { decode } from 'html-entities';

if ((response.body as string).includes('DDG.deep.is506')) throw new Error('A server error occurred!');
if (response.body.toString().includes('DDG.deep.anomalyDetectionBlock'))
throw new Error('DDG detected an anomaly in the request, you are likely making requests too quickly.');

@@ -167,0 +169,0 @@ const searchResults = JSON.parse(SEARCH_REGEX.exec(response.body)![1].replace(/\t/g, ' ')) as (CallbackSearchResult | CallbackNextSearch)[];

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