console
let code = document.getElementsByTagName('pre')
for (let x of code) {
let t = x.innerHTML
}
<h1>使用curl下载文件</h1>
<h2>在浏览器开发者工具network标签,找到相应的资源点击右键-->复制curl</h2>
<h2>打开终端命令行输入刚刚复制的命令</h2>
<pre>
curl -o song_part1.mp3 'https://mp3.itingwa.com/2020-10/20/20201020065614-NzA2MTYw.mp3' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36' \
-H 'Accept: */*' \
-H 'Sec-Fetch-Site: same-site' \
-H 'Sec-Fetch-Mode: no-cors' \
-H 'Sec-Fetch-Dest: audio' \
-H 'Referer: https://www.itingwa.com/' \
-H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7' \
-H 'Cookie: Hm_lvt_c37219ae99edc71b0fb7d4cb8b094498=1624437228; __utma=158286818.424407708.1624437228.1624437228.1624437228.1; __utmc=158286818; __utmz=158286818.1624437228.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); h=PsmIPQhNQ1fL_lJrIkyVAA; e=1624438875; __utmt=1; __utmb=158286818.4.10.1624437228; Hm_lpvt_c37219ae99edc71b0fb7d4cb8b094498=1624438308' \
-H 'Range: bytes=0-3018126' \
-H 'If-Range: "5fd9c193-2e0d8f"' \
--compressed
</pre>
<pre>
curl -o song_part2.mp3 'https://mp3.itingwa.com/2020-10/20/20201020065614-NzA2MTYw.mp3' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36' \
-H 'Accept: */*' \
-H 'Sec-Fetch-Site: same-site' \
-H 'Sec-Fetch-Mode: no-cors' \
-H 'Sec-Fetch-Dest: audio' \
-H 'Referer: https://www.itingwa.com/' \
-H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7' \
-H 'Cookie: Hm_lvt_c37219ae99edc71b0fb7d4cb8b094498=1624437228; __utma=158286818.424407708.1624437228.1624437228.1624437228.1; __utmc=158286818; __utmz=158286818.1624437228.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); h=PsmIPQhNQ1fL_lJrIkyVAA; e=1624438875; __utmt=1; __utmb=158286818.4.10.1624437228; Hm_lpvt_c37219ae99edc71b0fb7d4cb8b094498=1624438308' \
-H 'Range: bytes=65536-' \
-H 'If-Range: "5fd9c193-2e0d8f"' \
--compressed
</pre>
<h2>使用cat命令合并文件</h2>
<pre>
cat song_part1.mp3 song_part2.mp3 > song.mp3
</pre>