Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safeSearch not working #33

Closed
Niveshkrishna opened this issue Feb 1, 2022 · 3 comments
Closed

safeSearch not working #33

Niveshkrishna opened this issue Feb 1, 2022 · 3 comments
Labels
type: bug Verified problems that need to be worked on

Comments

@Niveshkrishna
Copy link

safeSearch is not respected by the scraper, it is returning same results for all cases

@Snazzah
Copy link
Owner

Snazzah commented Feb 1, 2022

What query are you using?

@Niveshkrishna
Copy link
Author

Niveshkrishna commented Feb 2, 2022

Here is the code I used, it prints same results for all the cases

const DDG = require('duck-duck-scrape');
let x = DDG.search('shit', {
  safeSearch: DDG.SafeSearchType.STRICT
}).then((data) => {
    data["results"].forEach(element => {
      console.log(element.title, 'STRICT')
    });
});

let y = DDG.search('shit', {
  safeSearch: DDG.SafeSearchType.MODERATE
}).then((data) => {
  data["results"].forEach(element => {
    console.log(element.title, 'MODERATE')
  });
});


let z = DDG.search('shit', {
  safeSearch: DDG.SafeSearchType.OFF
}).then((data) => {
  data["results"].forEach(element => {
    console.log(element.title, 'OFF')
  });
});

@Snazzah Snazzah added the type: bug Verified problems that need to be worked on label Feb 2, 2022
@Snazzah Snazzah closed this as completed in b82b431 Feb 2, 2022
@Niveshkrishna
Copy link
Author

Thank you @Snazzah. It is working now with the new release, appreciate your work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Verified problems that need to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants