I made a request by using the enter link description heresendfile_osm_oauth_protector

from subprocess import check_output

command = "curl -b 'text from cookie_output_file' https://osm- 
out = check_output(command)

how do I find the link to download in this output? it is like a complex text.

1 Answer 1


I found it by using bs4.

soup = BeautifulSoup(out, "html.parser")

for item in soup.find_all("a"):
    if "osm-internal" in item['href']:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.