course22 icon indicating copy to clipboard operation
course22 copied to clipboard

To fix duckduckgo_search compatibility issues

Open tom5610 opened this issue 1 year ago • 3 comments
trafficstars

Using class DDGS rather than calling ddg functions directly.

tom5610 avatar Feb 11 '24 00:02 tom5610

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

THANK YOU!

Fernandes2692 avatar Jun 13 '24 12:06 Fernandes2692

@tom5610 the code is perfect bro. you can even enhance it as below so the learner can understand it easily

from duckduckgo_search import DDGS
from fastcore.all import *

def search_images(term, max_images): 
    return L(DDGS().images(keywords=term, max_results=max_images)).itemgot('image')
urls = search_images("birds",100)
urls[0]

PranithChowdary avatar Aug 03 '24 04:08 PranithChowdary

I just came here to make this exact pull request! Fix works

wardu avatar Aug 28 '24 07:08 wardu