<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>batch-download on 林協霆醫師</title><link>/tags/batch-download/</link><description>林協霆醫師 (batch-download)</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><image><url>https://htl.physician.tw/favicon-32x32.png</url><title>林協霆醫師</title><link>https://htl.physician.tw/</link><width>32</width><height>32</height></image><webfeeds:icon>https://htl.physician.tw/favicon-32x32.png</webfeeds:icon><webfeeds:logo>https://htl.physician.tw/android-chrome-512x512.png</webfeeds:logo><webfeeds:accentColor>5bbad5</webfeeds:accentColor><lastBuildDate>Thu, 12 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="/tags/batch-download/index.xml" rel="self" type="application/rss+xml"/><item><title>batch-download-hiroka：批次下載資源的 Python 私有工具</title><link>/blog/batch-download-hiroka-2026-03-12/</link><pubDate>Thu, 12 Mar 2026 00:00:00 +0000</pubDate><guid>/blog/batch-download-hiroka-2026-03-12/</guid><description>&lt;h2 id="introduction引言" >
&lt;div>
&lt;a href="#introduction%e5%bc%95%e8%a8%80">
#
&lt;/a>
Introduction（引言）
&lt;/div>
&lt;/h2>
&lt;p>研究與教學工作中經常需要下載大量檔案：論文 PDF、課程影片、指引手冊、衛教素材等。手動下載不僅耗時，亦容易因步驟不一致而產生重複或缺漏。對於高頻擷取資料的研究者，自製批次下載工具是值得投資的個人基礎建設。本專案即為作者用於特定資料來源的下載自動化腳手架。&lt;/p>
&lt;h2 id="methods方法" >
&lt;div>
&lt;a href="#methods%e6%96%b9%e6%b3%95">
#
&lt;/a>
Methods（方法）
&lt;/div>
&lt;/h2>
&lt;p>實作以 Python 為主，採用 &lt;code>requests&lt;/code>、&lt;code>httpx&lt;/code> 等標準函式庫處理 HTTP 請求，搭配 &lt;code>tqdm&lt;/code> 提供進度顯示。設計上將「列表擷取」與「個別檔案下載」解耦：先取得需下載的清單與 metadata，再進入下載階段。下載階段支援續傳、平行化、與基本錯誤重試。所有下載紀錄存於本地 SQLite，避免重複擷取相同檔案。&lt;/p>
&lt;p>工具刻意保持私有，因為某些下載對象的 ToS 限制其再分發；公開化需要謹慎處理。整體保持輕量，便於應用於不同來源時快速調整。&lt;/p>
&lt;h2 id="results結果" >
&lt;div>
&lt;a href="#results%e7%b5%90%e6%9e%9c">
#
&lt;/a>
Results（結果）
&lt;/div>
&lt;/h2>
&lt;p>工具已能於背景處理大量下載任務，使作者得以將注意力放在資料分析而非檔案搬運。對於需要週期性更新本地素材庫（如 NCCN 指引、ESMO 簡報）的研究者，這顯著降低人工成本。&lt;/p>
&lt;h2 id="discussion討論" >
&lt;div>
&lt;a href="#discussion%e8%a8%8e%e8%ab%96">
#
&lt;/a>
Discussion（討論）
&lt;/div>
&lt;/h2>
&lt;p>本專案實踐了「將重複行為自動化」的個人生產力原則。限制方面，下載工具高度依賴目標網站的 HTML 結構，遇到改版便可能失效；同時需要謹守機構與來源的使用條款。未來可加入 LLM 輔助解析網頁結構、結合內容摘要自動篩選真正需要下載的檔案。&lt;/p>
&lt;h2 id="連結" >
&lt;div>
&lt;a href="#%e9%80%a3%e7%b5%90">
#
&lt;/a>
連結
&lt;/div>
&lt;/h2>
&lt;ul>
&lt;li>GitHub：&lt;a href="https://github.com/htlin222/batch-download-hiroka">htlin222/batch-download-hiroka&lt;/a>&lt;/li>
&lt;li>主要語言：Python&lt;/li>
&lt;li>最後更新：2026-03-12&lt;/li>
&lt;/ul></description></item></channel></rss>