Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
duckduckgo-images-api
Advanced tools
A lightweight node package to programmatically obtain image search results from DuckDuckGo search engine.
The method used is inspired from python package with same name. Thanks to, deepanprabhu for original source. This is my first node package and it was fun to write.
To install, run:
npm i duckduckgo-images-api
When using TypeScript, run:
npm i @types/duckduckgo-images-api
The package provides simple async api. And uses following config object as input:
{
query: "search term",
moderate : false,
iterations : 2 ,
retries : 2
}
image_search function return a promise that resolves to array of complete results.
image_search({ query: "birds", moderate: true }).then(results=>console.log(results))
image_search_generator function is a async generator that yield promise of result set on each iteration. Useful for large iterations. Please check the node version compatability for this syntax.
async function main(){
for await (let resultSet of image_search_generator({ query: "birds", moderate: true ,iterations :4})){
console.log(resultSet)
}
}
main().catch(console.log);
Please feel free to report any issues or feature requests.
DuckDuckGo provides an instant answer API. This package does not use this route. This package mocks the browser behaviour using the same request format. Use it wisely.
FAQs
DuckDuckGo image-search api for node
The npm package duckduckgo-images-api receives a total of 1,359 weekly downloads. As such, duckduckgo-images-api popularity was classified as popular.
We found that duckduckgo-images-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.