0

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- 
    internal.download.geofabrik.de/asia/philippines-latest-internal.osm.pbf"
out = check_output(command)

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

0

I found it by using bs4.

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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