Hi,

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 "http://11.12.13.27:8080" + 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.

Hi,
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:

>>> 
/cruisecontrol/artifacts/xxx/20100129115410/abc.zip
/cruisecontrol/artifacts/xxx/20100129115410/def.zip
/cruisecontrol/artifacts/xxx/20100129115410/ghi.zip
.....
.....
[B]/cruisecontrol/artifacts/xxx/20100129115410/clients_test4
/cruisecontrol/artifacts/xxx/20100129115410/clients_test5
/cruisecontrol/artifacts/xxx/20100129115410/clients_test7
/cruisecontrol/artifacts/xxx/20100129115410/clients_test9[/B]/cruisecontrol/artifacts/xxx/20100129115410/logs

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 https://10.11.12.27:8080/cruisecontrol/artifacts/xxx_nightly_build/20100129115410/clients_test5

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

Can anybody help me with the above problem?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.