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

duck-duck-scrape

Package Overview
Dependencies
Maintainers
1
Versions
25
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 1.0.3 to 2.0.0

CHANGELOG.md

73

package.json
{
"name": "duck-duck-scrape",
"version": "1.0.3",
"description": "A DuckDuckGo scraper for Node.js.",
"main": "index.js",
"version": "2.0.0",
"description": "Search from DuckDuckGo and use it's spice APIs.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"author": "Snazzah",
"contributors": [
"suushii"
],
"license": "MIT",
"repository": "https://github.com/Snazzah/duck-duck-scrape",
"homepage": "https://duck-duck-scrape.js.org/",
"keywords": [
"duckduckgo",
"ddg",
"search",
"api"
],
"bugs": {
"url": "https://github.com/Snazzah/duck-duck-scrape/issues"
},
"funding": {
"url": "https://github.com/sponsors/Snazzah"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "([ ! -d \"lib/\" ] || rm -r lib/*) && npx tsc",
"build:prepare": "[ -d \"lib/\" ] || npm run build",
"changelog": "ts-node scripts/changelog",
"lint": "npx eslint --ext .ts ./src",
"lint:fix": "npx eslint --ext .ts ./src --fix",
"test": "mocha -r ts-node/register --extension ts",
"gpr": "ts-node scripts/gpr",
"docs": "typedoc",
"prepare": "npx husky install && npm run build:prepare",
"prepublishOnly": "([ -d \"lib/\" ] || (echo \"lib folder does not exist\" && exit 1)) && npm run lint:fix"
},
"keywords": [
"duckduckgo"
],
"author": "suushii <suushii@protonmail.com> (https://suushii.github.io)",
"contributors": [
"Snazzah"
],
"license": "ISC",
"lint-staged": {
"*.ts": "eslint --fix"
},
"dependencies": {
"cheerio": "^1.0.0-rc.2",
"mustache": "^2.3.0",
"snekfetch": "^3.6.4"
"html-entities": "^2.3.2",
"needle": "^2.6.0"
},
"repository": {
"type": "git",
"url": "https://github.com/suushii/duck-duck-scrape.git"
"devDependencies": {
"@types/needle": "^2.5.1",
"@types/node": "^14.14.22",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"eslint": "^7.18.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-prettier": "^3.3.1",
"husky": "^6.0.0",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1",
"ts-node": "^9.1.1",
"typedoc": "^0.20.35",
"typescript": "^4.1.3",
"yarn": "^1.22.10"
}
}
}

@@ -1,24 +0,75 @@

# duck-duck-scrape
A DuckDuckGo scraper NPM module
<div align="center">
**Note: This isn't endorsed by DuckDuckGo in any way.**
[![](https://get.snaz.in/45RrSvq.png)](https://duck-duck-scrape.js.org/)
[![NPM](https://nodei.co/npm/duck-duck-scrape.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/duck-duck-scrape/)
[![NPM version](https://img.shields.io/npm/v/duck-duck-scrape?maxAge=3600?&color=3498db)](https://www.npmjs.com/package/dexare) [![NPM downloads](https://img.shields.io/npm/dt/duck-duck-scrape?maxAge=3600&color=3498db)](https://www.npmjs.com/package/dexare) [![ESLint status](https://github.com/Snazzah/duck-duck-scrape/workflows/ESLint/badge.svg)](https://github.com/Dexare/Dexare/actions?query=workflow%3A%22ESLint%22) [![DeepScan grade](https://deepscan.io/api/teams/11596/projects/16764/branches/365136/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=11596&pid=16764&bid=365136)
# Installation
`npm install --save duck-duck-scrape`
`npm install duck-duck-scrape` - `yarn add duck-duck-scrape`
# Setup
```javascript
const DuckDuckScrape = require("duck-duck-scrape");
const ddg = new DuckDuckScrape();
Search from DuckDuckGo and utilize its spice APIs for things such as stocks, weather, currency conversion and more!
</div>
### Available Features
- Search
- Regular search
- Image search
- Video search
- News search
- Stocks (via Xignite)
- Time for Location API (via timeanddate.com)
- Currency Conversion (via XE)
- Forecast (via Dark Sky)
- Dictionary
- Definition
- Audio
- Pronunciation
- Hyphenation
### Quickstart
#### JavaScript
```js
const DDG = require('duck-duck-scrape');
const searchResults = await DDG.search('node.js', {
safeSearch: DDG.SafeSearchType.STRICT
});
// DDG.stocks('aapl')
// DDG.currency('usd', 'eur', 1)
// DDG.dictionaryDefinition('happy')
console.log(searchResults);
/**
{
noResults: false,
vqd: '3-314...',
results: [
{
title: 'Node.js® is a JavaScript runtime built on Chrome&#x27;s V8 JavaScript...',
...
url: 'https://nodejs.org/',
bang: {
prefix: 'node',
title: 'node.js docs',
domain: 'nodejs.org'
}
},
...
]
}
*/
```
# Documentation
https://suushii.github.io/duck-duck-scrape/index.html
#### TypeScript
```js
import { search, SafeSearchType } from 'duck-duck-scrape';
// import * as DDG from 'duck-duck-scrape';
# Attribution
const searchResults = await search('node.js', {
safeSearch: SafeSearchType.STRICT
});
```
Original code by Snazzah
Packaged by suushii

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