I want to access a link starting with clients_test on a particular webpage. I have the following code

client_re = re.compile(r"clients_test")

def get_client_url():
url = get_artifacts_url()
for link in get_links(url):
if client_re.search(link["href"]):
return "" + link["href"]

Sometimes the page has many links beginnng with clients_test for e.g: clients_test4, clients_test5, clients_test7. The above code just gives me the first link. so in this case i get clients_test4. I want it to return me all the links beginning with clients_test on the python shell so that the user can then specify the from which one he wants to download the exe file.

Kindly help me as i am from QA.

7 Years
Discussion Span
Last Post by dbphydb

I went thru what u sent. Alas didnt understand a thing as i am not a developer. I googled and did a findall in the code i posted earlier. Got the below:


Now the webpage has abc.zip, def.zip, clients_test5, clients_test7 etc etc each on a new line. Now i need python to ask the user to either choose clients_test4 or clients_test5 or clients_test7 or clients_test9. So suppose if the users writes clients_test5 the URL build will be

All i want to know is how to code the interactive part. Please help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.