xxxxxxxxxx
import requests
url = 'https://drive.google.com/file/d/1VaqO9FYzYJErW-QTaQQimYaWLJwMb2m1/view?usp=sharing'
r = requests.get(url, allow_redirects=True)
open('service_account_token.json', 'wb').write(r.content)
xxxxxxxxxx
function download(url, filename) {
fetch(url).then(function(t) {
return t.blob().then((b)=>{
var a = document.createElement("a");
a.href = URL.createObjectURL(b);
a.setAttribute("download", filename);
a.click();
}
);
});
}
download("https://get.geojs.io/v1/ip/geo.json","geoip.json")
download("data:text/html,HelloWorld!", "helloWorld.txt");
xxxxxxxxxx
//
DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
Uri uri = Uri.parse("https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf");
DownloadManager.Request request = new DownloadManager.Request(uri);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE);
long reference = manager.enqueue(request);
xxxxxxxxxx
Way better for detailed images:
https://www.photoroom.com/tools/background-remover