from bs4 import BeautifulSoup
import requests
soup = BeautifulSoup(requests.get( 'https://www.google.com/search?q=index of movie', 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"
}).text, 'lxml')
list = [];
for links in soup.find_all('div', class_='yuRUbf'):
out = {
"title": links.h3.text,
"link": links.a['href']
}
list.append(out);
print(list);
Google Search Api