How to click on every link from a list of links? - Python, Selenium -
i trying click on 1 link list of links, wait 1 second (not added yet) , click on next link. using selenium , bs4. code:
links = ['https://www.bing.com', 'https://www.google.com', 'https://www.yahoo.com'] url in links: url = "'"+url+"'" print(url,'\n') browser = webdriver.firefox browser.get(url) and error getting:
traceback (most recent call last): file "c:/users/sk/pycharmprojects/untitled/linkedin_bot.py", line 38, in <module> browser.get(url) typeerror: get() missing 1 required positional argument: 'url' what doing wrong , how solve it? thanks
you need change browser = webdriver.firefox browser = webdriver.firefox(). is, when call browser.get(url), expecting webdriver.firefox instance first argument , url second argument. when include parentheses, creating instance of webdriver.firefox , python automatically gives first argument.
Comments
Post a Comment