Logo

Transmission+FlexGet=超強BT下載機

FlexGet相關文章請優先參考最新版

2020年10月6日 – 三戰FlexGet(CentOS 8 with Python 3.6.8)

文章已隨CentOS 6更新,請移步到再戰FlexGet,打造BT下載機
Transmission玩了那摸久,最近嘗試了搭配FlexGet來實現讀取RSS自動下載功能,測試了幾天確定是OK了啦! 其實很多錯誤是卡在CentOS真的跟帽子差不多機歪,安全性太高了,搞的自己都混亂了,前前後後re-install了幾次OS才確定OK,環境一樣是CentOS 5.5,如果不是用CentOS的會方便很多,總之有興趣在往下看吧! ?

安裝前準備動作:1.安裝Transmission、2.更新Python

Step.1 下載需要的套件

cd /usr/src
wget http://pysqlite.googlecode.com/files/pysqlite-2.6.0.tar.gz

Step.2 安裝基本套件

tar zxf pysqlite-*.tar.gz
cd pysqlite-*
python setup.py build_static install
cd ..
rm -fr pysqlite-*

Step.3 安裝所有套件

easy_install BeautifulSoup FeedParser FlexGet html5lib progressbar pynzb PyRSS2Gen PyYAML SQLAlchemy transmissionrpc

Step.4 設定FlexGet設定檔

mkdir -p /root/.flexget/
vi /root/.flexget/config.yml

config.yml內容如下

feeds:
  tv-shows:
    rss: http://chdbits.org/torrentrss.php?rows=10&linktype=dl&passkey=ooxx
    series:
      - Guilty
      - Iryu
      - Nagareboshi
    set:
      path: /web/www/transmission
    transmission:
      host: localhost
      port: 5566
      username: Transmission設定檔中的rpc-username
      password: Transmission設定檔中的rpc-password

簡單的說明各項參數的意義,從第一行的feeds:開始是一個區段,接下來的rss:就是PT站台提供的RSS連結網址,每家都會不同,如果想擷取多家的RSS話就在transmission區段的上面再加一個feeds:區段即可。

series:下面的- Guilty、- Iryu、- Nagareboshi就是指RSS出現這些字串的種子時就自動下載

set:是下載位置,設定跟Transmission的設定檔settings.json裡面的download-dir一樣即可。

第二段的transmission:開始是Transmission設定,設定一樣是依照Transmission的設定檔settings.json裡面的rpc-port、rpc-username、rpc-password即可。

Step.5 測試FlexGet運作是否成功

/usr/local/bin/flexget --test

出現如圖所示就成功了。 ?

Step.6 定時排程每10分鐘執行FlexGet讀取RSS

crontab -e

排程內容如下

*/10 * * * * /usr/local/bin/flexget -cron -c /root/.flexget/config.yml > /dev/null 2>&1

Step.7 定時每1小時清理已完成的種子

crontab -e

排程內容如下

* */1 * * * /root/.flexget/transmission-cleanup.sh > /dev/null 2>&1
vi /root/.flexget/transmission-cleanup.sh

transmission-cleanup.sh內容如下

transmission-remote --auth lulala:balala -l | grep 100% | grep Done | awk '{print $1}' | xargs -n 1 -J % ./transmission-remote -t % -r

替transmission-cleanup.sh加上權限

chmod +x /root/transmission-cleanup.sh

參考網頁:http://flexget.com/wiki/Plugins/transmission
http://flexget.com/wiki/Configuration
The Cookbook

關於 窮苦人家的小孩

In every democracy, the people get the government they deserve. ~Alexis de Tocqueville
上一篇:
下一篇:

您可能會喜歡

桃乃木かな 桃乃木香奈 Kana Momonogi

CloudCone全自動DD安裝Windows

前陣子VPS優惠 – Clou …

8 留言

  1. 我知道是驗證的,所以才叫你設置看看,因為我sh跟你的不同就是我有設置而你沒設置。
    我的系統是CentOS 5.7,32/64位元都有,運作很久了~ 沒出現什麼怪問題。

    –auth應該是指驗證的用戶名密碼,這個我沒有設置的哦。出錯的關鍵是xargs: invalid option — ‘J’ ,官網也是這樣,參數不能識別呢,博主的實驗環境也是Centos5.5嗎?好奇怪呢> <

  2. –auth應該是指驗證的用戶名密碼,這個我沒有設置的哦。出錯的關鍵是xargs: invalid option — ‘J’ ,官網也是這樣,參數不能識別呢,博主的實驗環境也是Centos5.5嗎?好奇怪呢> <

  3. 也祝你身體健康,你的SH內容少了–auth lulala:balala喔~ 試試看先 0.0 因為我這邊運作正常呢,transmission版本是2.41,也可參考官網WIKI~ ?

    xargs的-J參數是錯誤的,請修正這個錯誤好嗎?因為對xargs命令用法不熟悉,我個人無法修正這個錯誤。謝謝了,新年快樂。

  4. transmission-remote –auth lulala:balala -l | grep 100% | grep Done | awk ‘{print $1}’ | xargs -n 1 -J % ./transmission-remote -t % -r
    xargs的-J參數是錯誤的,請修正這個錯誤好嗎?因為對xargs命令用法不熟悉,我個人無法修正這個錯誤。謝謝了,新年快樂。

  5. SH内容:
    [root@localhost ~]# cat /root/.flexget/transmission-cleanup.sh
    transmission-remote 5566 -l | grep 100% | grep Done | awk ‘{print $1}’ | xargs -n 1 -J % ./transmission-remote -t % -r
    [root@localhost ~]#

  6. 您好,我在修改transmission-cleanup.sh的時候發生了以下錯誤:
    xargs: invalid option — ‘J’
    我對xargs並不是很熟悉,能不能幫我修復這個錯誤呢?謝謝啦~!
    [root@localhost ~]# /root/.flexget/transmission-cleanup.sh
    xargs: invalid option — ‘J’
    Usage: xargs [-0prtx] [–interactive] [–null] [-d|–delimiter=delim]
    [-E eof-str] [-e[eof-str]] [–eof[=eof-str]]
    [-L max-lines] [-l[max-lines]] [–max-lines[=max-lines]]
    [-I replace-str] [-i[replace-str]] [–replace[=replace-str]]
    [-n max-args] [–max-args=max-args]
    [-s max-chars] [–max-chars=max-chars]
    [-P max-procs] [–max-procs=max-procs] [–show-limits]
    [–verbose] [–exit] [–no-run-if-empty] [–arg-file=file]
    [–version] [–help] [command [initial-arguments]]
    Report bugs to .
    [root@localhost~]#

  7. 您好,我在修改transmission-cleanup.sh的时候发生了以下错误:
    xargs: invalid option — ‘J’
    我对xargs并不是很熟悉,能不能帮我修复这个错误呢?谢谢啦~!

    • 你有把內容貼好來嗎 @@? 應該是簡繁中文轉換上的問題,先試試不轉換,把sh的內容貼上。

      您好,我在修改transmission-cleanup.sh的时候发生了以下错误:
      xargs: invalid option — ‘J’
      我对xargs并不是很熟悉,能不能帮我修复这个错误呢?谢谢啦~!

發佈留言