GithubHelp home page GithubHelp logo

1420125167 / flexget-nexusphp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juszoe/flexget-nexusphp

0.0 0.0 0.0 88 KB

A flexget plugin for filter nexusphp torrents

License: GNU General Public License v3.0

Python 100.00%

flexget-nexusphp's Introduction

flexget-nexusphp

Flexget插件,增强对NexusPHP的过滤
过滤条件包括种子优惠信息(free等)、做种者情况、下载者情况


更多插件:IO过高时停止任务插件

免责声明

本插件会爬取details.php页面,请将参数限制到合理的范围,减轻对服务器负担
本插件已尽量减轻服务器负担,因本插件造成账号封禁等损失,请自行承担后果
建议 将RSS条目限制在20条以内,将Flexget运行频率设置在10分钟以上。 如果不想对人数进行过滤,不建议设置seeders和leechers参数。

运行环境

安装插件

  1. 下载插件 nexusphp.py
  2. 在Flexget配置文件夹下新建plugins文件夹,例如:
~/.flexget/plugins/  # Linux
C:\Users\<YOURUSER>\flexget\plugins\  # Windows

再次注意plugins文件夹和config.yml处在同一级目录下,例如:

/.flxget
  ┕━config.yml
  ┕━plugins
    ┕━nexusphp.py
  1. 将插件拷贝至plugins
  2. 若启用了Web-UI或守护进程,则重启flexget重新加载配置

使用

  1. 编辑flexget配置文件,添加nexusphp选项,按照需要进行配置

简单配置

nexusphp:
  cookie: 'a=xxx; b=xxx'  # 必填
  discount:  # 优惠信息 选填
    - free

完整配置

nexusphp:
  cookie: 'a=xxx; b=xxx'  # 必填
  discount:  # 优惠信息 选填
    - free
    - 2x
    - 2x50%
    - 2xfree
    - 50%
    - 30%
  seeders:  # 做种情况 选填(兼容性较差不建议使用)
    min: 1
    max: 2
  leechers:  # 下载情况 选填(兼容性较差不建议使用)
    min: 10
    max: 100
    max_complete: 0.8
  left-time: 1 hours  # 优惠剩余时间 选填
  hr: no  # 是否下载HR 选填
  adapter:  # 站点适配器,自行适配站点,参考最下方常见问题 选填
    free: free
    2x: twoup
    2xfree: twoupfree
    30%: thirtypercent
    50%: halfdown
    2x50%: twouphalfdown
  comment: no  # 在torrent注释中添加详情链接 选填
  user-agent: xxxxxx  # 浏览器标识 选填
  remember: yes  # 记住优惠信息 选填 请勿随意设置
  1. 为rss的other_fields字段添加link属性
rss:
  url: https://www.example.com/rss
  other_fields: [link]
  1. 启动flexget
flexget execute
# 如果仅仅想要测试而不下载,可以添加 --test 参数
flexget --test execute

详细配置

  • cookie 网站cookie 必须填写
  • discount 优惠类型 默认不限制优惠类型。
    列表类型,Flexget会只下载含有列表内优惠类型的种子。
    有效值:free 2x 2x50% 2xfree 50% 30%
    注意:x为英文字母
  • seeders 做种情况 做种人数超出范围的,Flexget将不会下载
    • 注意:此选项兼容性较差
    • min 最小做种人数。整数,默认不限制
    • max 最大做种人数。整数,默认不限制
  • leechers 下载情况 下载人数超出范围的,Flexget将不会下载
    • 注意:此选项兼容性较差
    • min 最小下载人数。整数,默认不限制
    • max 最大下载人数。整数,默认不限制
  • max_complete 下载者中最大完成度 超过这个值将不下载。 小数,范围0-1.0,默认为1
  • left-time 最小剩余时间 当实际剩余时间小于设置的值,则不下载。 时间字符串,例如 3 hours10 minutes1 days。 例如设置1 hours,优惠剩余59分钟,那么就不下载。默认不限制
  • hr 是否下载HR种 默认 yes
    1. yes 会下载HR,即不过滤HR
    2. no 不下载HR
  • adapter 站点适配器 站点不兼容时可自定义,具体参考 判断站点以及适配站点
  • comment 在torrent注释中添加详情链接
    1. yes 在torrent注释中添加详情链接,方便在BT客户端查看
    2. no 默认值
  • user-agent 浏览器标识 默认为Google浏览器
  • remember 记住优惠信息 不建议设置为 no,因为会增大站点压力。默认 yes

完整配置示例

免费热种

tasks:
  my-free-task:
    rss:
      url: https://www.example.com/rss.xml
      other_fields:
        - link
    nexusphp:
      cookie: 'a=xxx; b=xxx'
      discount:
        - free
        - 2xfree
    download: ~/flexget/torrents/

热种

tasks:
  my-hot-task:
    rss:
      url: https://www.example.com/rss.xml
      other_fields:
        - link
    nexusphp:
      cookie: 'a=xxx; b=xxx'
      seeders:
        min: 1
      leechers:
        min: 20
    download: ~/flexget/torrents/

避免HR

tasks:
  no-hr-task:
    rss:
      url: https://www.example.com/rss.xml
      other_fields:
        - link
    nexusphp:
      cookie: 'a=xxx; b=xxx'
      hr: no
    download: ~/flexget/torrents/

常见问题

我的python版本是2.X如何使用?

本插件只支持Python 3.X或Python 2.7版本,其他版本不可用,请卸载Flexget后使用Python3重装

pip uninstall flexget  # 卸载
pip3 install flexget  # 使用pip3安装

目前支持哪些站点

如果站点禁止使用脚本爬虫,应立即停止使用本插件

  • 任何未修改关键结构的nexusphp站点
  • PTH
  • MT(站点安全性较高,ip或浏览器变动可能无法访问)
  • OB
  • Sky
  • School
  • U2
  • CHD
  • TJU(禁止脚本,请勿使用)
  • SSD
  • OpenCD
  • TTG(不支持人数筛选)
  • FRDS
  • Dream
  • HDC
  • LemonHD

如何判断站点是否支持

判断站点以及适配站点

确认cookie正确,还是提示 Can't access the site. Your cookie may be wrong!

某些站点安全性要求较高,ip或浏览器变动时无法使用cookie访问,需要重新登录。
解决办法:设置 user-agent 参数与浏览器相同,查看浏览器user-agent的方法自行搜索,并保证登录ip与使用Flexget相同。

站点启用了Cloudflare五秒盾无法获取信息

当触发Cloudflare五秒盾通常有以下提示:

NexusPHP._get_info: 503 Server Error: Service Temporarily Unavailable for url

解决方案也很简单,可以考虑使用Flexget官方内置的插件cfscraper

  1. 首先需要安装依赖
pip install cloudscraper
  1. 然后启用
cfscraper: yes

注意!绕过站点安全机制可能有风险,自行决定是否使用

支持作者

插件经常需要时间维护,如果本插件对你有用,可以请作者吃顿饭😉,给作者提供更多动力
wechatpay

flexget-nexusphp's People

Contributors

huxuan avatar juszoe avatar luyiming avatar xfl03 avatar

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.