-
-
Save kagermanov27/68f49a1bac23ef622032d58c0b9b8f78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def serpapi_search(self): | |
params = { | |
"engine": "google", | |
"ijn": self.query.ijn, | |
"q": self.query.q, | |
"google_domain": self.query.google_domain, | |
"tbm": "isch", | |
"num": self.query.num, | |
"api_key": self.query.api_key | |
} | |
search = GoogleSearch(params) | |
results = search.get_dict() | |
results = results['images_results'] | |
self.results = results = [x['original'] for x in results] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment