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
import os, json | |
from serpapi import BaiduSearch | |
def get_answerbox_result(): | |
params = { | |
"engine": "baidu", | |
"q": "coffee", | |
"api_key": os.getenv("API_KEY"), | |
} |
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
from bs4 import BeautifulSoup | |
import requests, json, lxml | |
headers = { | |
"User-Agent": | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19582" | |
} | |
def get_organic_results(): |
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
from serpapi import GoogleSearch | |
import os, json | |
def get_organic_results(): | |
params = { | |
"engine": "ebay", | |
"ebay_domain": "ebay.com", | |
"_nkw": "minecraft creeper figure", | |
"api_key": os.getenv("API_KEY"), |
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
from serpapi import GoogleSearch | |
def get_video_results(): | |
params = { | |
"api_key": "YOUR_API_KEY", | |
"engine": "youtube", | |
"search_query": "minecraft" | |
} | |
search = GoogleSearch(params) |