I'm making a basic "I'm feeling lucky" Python application but when I try to select the link, it returns nothing.
import requests, webbrowser, bs4, sys
print('Googling...')
res = requests.get('https://google.com/search?q=%s' % sys.argv[1])
if res.status_code != 200:
print('Invalid input')
sys.exit()
res = res.text
soup = bs4.BeautifulSoup(res, features='html.parser')
search = soup.select('.r') # trying to select the class "r"
print(search) # returns "[]"