Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
download file from url
#4
Something like:

import requests

REPO_NAME = "roundcube/roundcubemail"
GITHUB_URL = "https://api.github.com/repos/"

latest = requests.get(f"{GITHUB_URL}{REPO_NAME}/releases/latest").json()
download_url = [x["browser_download_url"] for x in latest["assets"]
                    if x["name"].endswith("complete.tar.gz")][0]
print(f"Download URL is {download_url}")
Reply


Messages In This Thread
download file from url - by fernandosianet - Oct-27-2020, 05:42 PM
RE: download file from url - by Axel_Erfurt - Oct-27-2020, 06:53 PM
RE: download file from url - by fernandosianet - Oct-27-2020, 08:14 PM
RE: download file from url - by bowlofred - Oct-29-2020, 03:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FTP Download of Last File jland47 4 287 Mar-16-2024, 09:15 AM
Last Post: Pedroski55
  download a file from a URL JayManPython 7 1,241 Jun-28-2023, 07:52 AM
Last Post: JayManPython
  FTP File Download question / concern cubangt 3 1,270 Jan-06-2022, 07:46 PM
Last Post: cubangt
  download with internet download manager coral_raha 0 2,880 Jul-18-2021, 03:11 PM
Last Post: coral_raha
  Download file from Private GitHub rep vinuvt 0 1,930 Jul-27-2020, 11:38 AM
Last Post: vinuvt
  PyDrive download file path MiniMinnow 0 3,210 Apr-28-2020, 03:01 PM
Last Post: MiniMinnow
  download file from google drive .. evilcode1 7 13,585 Sep-21-2018, 06:13 PM
Last Post: evilcode1
  Download entire web pages and save them as html file with urllib.request fyec 2 14,570 Jul-13-2018, 10:12 AM
Last Post: Larz60+
  download dataset from SH file Felix 1 2,558 Mar-28-2018, 05:04 AM
Last Post: Larz60+
  Download file from Internet Tribunal 1 2,745 Oct-11-2017, 06:03 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020