Code Monkey home page Code Monkey logo

mikantoaria2's Introduction

Mikan to Aria2

读取蜜柑计划的rss订阅,下载最新的动画!


需要 python > 3.10

海象运算符 yes! :=

以前用树莓派的时候写的小脚本,现在我已经不用了。

推荐

Auto_Bangumi 基于 Mikan ProjectqBittorrent 的全自动追番整理下载工具。只需要在 Mikan Project 上订阅番剧,就可以全自动追番。并且整理完成的名称和目录可以直接被 PlexJellyfin 等媒体库软件识别,无需二次刮削。

使用方式

  • 修改config/config.default.yml,重命名为config.yml保存到config文件夹下

  • 或者: 使用环境变量MTA_CONFIGPATH指定配置文件,支持yml和json

  • 给脚本加个crontab定时执行,例如:

*/30 * * * * python MikanToAria2/main.py

环境变量

  • MTA_CONFIGPATH 配置文件路径,默认为config/config.yml
  • MTA_HISTORY_FILE 指定历史保存文件路径
  • MTA_TORRENTS_DIR 种子保存文件夹,默认为torrents
  • MTA_MAX_HISTORY 最大加载历史记录,默认为300
  • MTA_USER_AGENT 使用的user-agent
  • HTTP_PROXY & HTTPS_PROXY 代理地址
  • MTA_ARIA2_HOST,MTA_ARIA2_PORT,MTA_ARIA2_SECRET aria2配置

config.yml 说明 (json也行)

aria2 (可选)

  • host 你的aria2的rpc链接地址

  • port rpc端口,默认为6800

  • secret rpc密码

proxy (可选)

  • http 一般是http://127.0.0.1:1080,socks5可以用'socks5://127.0.0.1:1080'

  • https 同上,前缀是https,也可以用'socks5://127.0.0.1:1080'

mikan list[dict, ...],每项含有以下key组成的字典

Tip

ubuntu 使用ssr

sudo apt update
sudo apt install shadowsocks-libev
ss-local -s youserverip -p youserverport -k youserverpasswd -m aes-256-gcm -l 1080 -b 127.0.0.1 &

mikantoaria2's People

Contributors

taokyla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mikantoaria2's Issues

有可能出错的情况

您的这个程序很小巧,比 flexget 轻便多了。

不过我运气不好,第一次使用就遇到了一个问题。添加喵萌奶茶屋的rss: 古见同学 。然后规则过滤1080简。

程序在发送第 3 集之后停止了。然而 main.py 中也没有限制每次 10 个。回到订阅源中,发现这两个 item 的标题完全一样,因此判断后面的都已经下载过了
https://mikanani.me/Home/Episode/dcecd4086affeb7f3dfd7dab16b4ed8f0ded1c6b
https://mikanani.me/Home/Episode/63498dc8da812cfc3e1e7e3b79267c71542cae7f

可以看到标题完全一样。但是地址不一样

不得不说,完全一样的标题很少见,我以前也没有遇见过。我猜测可能是做了什么改动,又重新上传了,而旧的也没有删。

  1. 如果已经有同名再添加 rss,之前的集数全都不会发送给 aria2。
  2. 如果是先添加 rss,再有同名,新版本就因同名而不发送。(当然,这种情况即使发送给 aria2,aria2 也会因为文件同名而停止下载。)这是aria2的问题,似乎也不好解决……

不过无论如何,毕竟它们是不同的资源,还是应该找一个办法区分比较好。aria2 的问题,归 aria2 去解决。

我觉得用 <link> 来辨别更好。
不用 <guid> 是因为蜜柑把 title 当作 guid,而不是像大多数情况把 link 当作 guid。当然蜜柑其实是对的,如果我们用正规的 rss 阅读器,就会在 guid 相同、但内容不同时更新内容,而不是直接退出。但这毕竟不是 rss 阅读器。

当然,不改也没事。这种情况真的很少遇到……我看了一下,就《古见同学》而言,蜜柑第 3 集有同名,而dmhy和萌番组都只有一个新版本。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.