I have a question regarding a script that I am writing. The problem is indicated in: #FIXME comment,start_string should be inserted only once but it kept inserting after each iteration.
script.py:
NUMBER_OF_PAGES_TO_SEARCH = 50 #change this if you want to go over more pages
page = NUMBER_OF_PAGES_TO_SEARCH
start_string = '&start='
while True:
if page != 0 :
try:
#FIXME: start_string is inserted after each loop, page decrement is working correctly
driver.get(driver.current_url + start_string +str(page))
except:
break
time.sleep(7)
# print(page_to_count)
page = page - 10
if page == 0:
break
print(page)
start_stringis inserted? Please post the wholeforloop so we can see what you are iterating over.