https download
Mar 29, 2020 7:58:21 GMT -5
Post by meerkat on Mar 29, 2020 7:58:21 GMT -5
Trying to web scrape https data.
As you know httpGet$ will not download https data. So trying JavaScript.
I know very little about JS, so need the JS experts to jump in.
I'm trying the download.download script described here: developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads/download
Basically I get nothing back. I added a alert() to the code just to see if it was executing. It shows the alert.
---------------------------------------------
To make it very simple, I tried this:
Thanks for the help..
Dan
As you know httpGet$ will not download https data. So trying JavaScript.
I know very little about JS, so need the JS experts to jump in.
I'm trying the download.download script described here: developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads/download
Basically I get nothing back. I added a alert() to the code just to see if it was executing. It shows the alert.
html "<script>
function onStartedDownload(id) {
console.log(`Started downloading: ${id}`);
}
function onFailed(error) {
console.log(`Download failed: ${error}`);
}
var downloadUrl = 'https://finance.yahoo.com/most-active?.tsrc=fin-srch';
alert(downloadUrl);
var downloading = browser.downloads.download({
url : downloadUrl,
saveAs : true;
filename : 'e:/data/temp/hist.txt',
conflictAction : 'uniquify'
});
downloading.then(onStartedDownload, onFailed);
</script>"
wait---------------------------------------------
To make it very simple, I tried this:
html "<script>
var downloading = browser.downloads.download({
url : 'https://www.google.com/',
filename : 'hist.txt'
});
</script>"
waitThanks for the help..
Dan