Answer the question
In order to leave comments, you need to log in
Line by line following links from a list through a for loop?
Hi, I can't figure out how to implement this.
In my "spis" list, links to sites are loaded line by line.
Next, you need to execute the "Brouser,get()" action on each link from the list.
But I can't figure out how to do this, because I create the "get" variable before the loop and I can't add the list to it.
Thank you in advance.
from selenium import webdriver
from selenium.webdriver import Firefox
browser = webdriver.Firefox()
spis = []
with open('file.txt') as f:
spis = f.read().splitlines()
get = browser.get(spis)
for get in xrange(1,10):
pass
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question