備忘錄_20160105(定位) 修改 回首頁

程式 2025-02-20 11:46:40 1740023200 100
下載或抓取網路檔案

下載或抓取網路檔案

●wget
[terminal] wget https://a.b.c/d.htm

●curl
[terminal] curl -o e.htm https://a.b.c/d.htm

●python
import urllib.request
urllib.request.urlretrieve("https://a.b.c/d.htm", "e.htm")

●php
<?php
echo file_get_contents("https://a.b.c/d.htm");
?>

●html
<a href="https://a.b.c/d.htm">d.htm</a>
滑鼠按右鍵,另存新檔之類的

●javascript (在 webbrowser 的 console 中)
var a=document.createElement('a'); a.href='https://a.b.c/d.htm'; a.download='a.htm'; a.click();