Closed kerafb closed 2 years ago
Hi. 1) Update the package.
python3 -m pip install -U duckduckgo_search
2) Are you taking this into account?
WARNING!: set a delay of at least 0.75 seconds between function calls.
3) Show me your code.
I'm searching for this word. Not responding Clean eating lunches
I am using this code
from duckduckgo_search import ddg
keywords = 'Clean eating lunches'
results = ddg(keywords, region='wt-wt', safesearch='Moderate', time='y', max_results=100)
print(results)
Your code works
from duckduckgo_search import ddg
keywords = 'Clean eating lunches'
results = ddg(keywords, region='wt-wt', safesearch='Moderate', time='y', max_results=100)
print(results)
Output:
[
{
"title": "Gluten-Free Lunch Recipes - Clean Eating Kitchen",
"href": "https://www.cleaneatingkitchen.com/category/lunch-recipes/",
"body": "Healthy Tuna Pasta Salad Instant Pot Red Lentil Dal Vitamix Tomato Soup (Vegan) Erewhon Kale Salad (Copycat) Lentil Turkey Soup Cranberry Walnut Chicken Salad Panera Chicken Noodle Soup (Copycat) Air Fryer Corn Dogs Vegan Potato Leek Soup (Instant Pot or Stovetop) 5-Ingredient Healthy Chicken Salad Buckwheat Bread"
},
...
]
Found the solution to the problem. I set 100 results for each word. For some words, for example, when it finds 50 or 60 results, it queries again and again forever and continues in this way because it cannot produce 100 results. I solved the problem by editing the library with a programmer. Thank you
Great. But with the keywords you pointed out, I could not reproduce your problem. I don't mind if your programmer makes a pull request to fix the bug, if it exists.
Thanks.
I am using this code. I am searching by scraping words from a txt file. Sometimes, as a result of the word search, it enters the bug and waits for hours. It goes into an endless sleep cycle. And goes to sleep for hours without finding any results