I have just started working on a project which I intend on being able to input a search/question and have the first links that Google gives for the search pop up. The user will select/type the number I will provide before the links in a list format of 10-20 links. The links will include the names of the links that google provides above each link as well. Once the user has selected a link they will be given another search which will search the website for all words letters or phrases (basically the f3 function) and list them. I was also thinking I may make it so that if there is a featured excerpt from the top article as google often provides as a means of gaining a helpful answer fast and list that along with the list of links as to help the user gain an answer faster. I am also thinking it would be helpful if I could somehow make it possible to copy anything that is shown/listed in the program/terminal but I am going to focus on finishing the main project first. While working on this I came across a problem and I don't know what to make of it, I have tried finding answers but I can't pinpoint my problem. If you know what my error is please help I am a novice to code and could use some help, thanks. ☺
CODE(sorry about that):
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
Question = input("Search: ")
driver = webdriver.Firefox()
driver.get("http://www.google.com")
assert "Google" in driver.title
driver.find_element_by_id('loginForm')
elem.clear()
elem.send_keys(Question)
elem.send_keys(Keys.RETURN)
driver.find_elements_by_class_name("LC201b")