Git Product home page Git Product logo

pt_signin's Introduction

阿里云云函数计费有改动,具体请查看官方公告。近期可能会迁移到华为云(但是华为云很难用),有更好的建议请移步到issues。

当图片显示异常时,可以尝试访问这里

前言

近期GitHub官方对github action签到使用趋向严格,action有毙命的风险。本项目改用阿里云函数进行签到,更加合规稳定。实测,流量费用可以抹零而免费额度完全够用,所以也不会产生费用。

🌀简介

PTsignin 是一个基于上游项目flexget_qbittorrent_mod阿里云函数 实现的对PT站点的自动签到和数据统计。

项目地址:lhllhx/PT_signin

如果觉得本项目对你有帮助,请顺手点个Star吧♥

🎪预览

preview preview

💡特性

  • 自动签到 程序会在每天早上自动执行签到流程
  • 支持同步 自动同步上游仓库,默认开启
  • 多种推送渠道 支持通过telegram和微信来推送信息
  • 多站点覆盖 覆盖大部分内站站点和部分外站站点

❗️用前须知

使用 PTsignin 即表明,您知情并同意:

  • 此代码通过模拟浏览器使用 Cookies 登录pt站点页面,实现自动签到和数据统计。使用时请确保遵守站点相关规定。

  • 您使用PTsignin造成的一切损失,与PTsignin无关。PTsignin不会对您的任何损失负责,包括但不限于奖励回收、账号异常

📐部署

部署流程比较繁琐,请耐心看完

流程框架:
1. Star 仓库(可选但是强烈建议)
2. 获取百度ORC_Api_token
3. 配置telegram_bot或企业微信推送
4. 填写配置文件
5. 加密打包并上传至私人仓库
6. 获取github_api_token
7. 进入阿里云云函数并创建函数

详细教程:

1.Star仓库

2.获取百度ORC_Api_Token

打开 https://cloud.baidu.com/doc/OCR/s/dk3iqnq51 根据教程获取app_id api_key secret_key

3.配置telegram_bot或企业微信推送

企业微信推送: 企业微信消息发送插件,微信可关注微工作台接收消息,不必安装企业微信
企业微信获取参数:https://work.weixin.qq.com/api/doc/90000/90135/90665

telegram_bot: 官方教程:https://core.telegram.org/bots#3-how-do-i-create-a-bot
具体教程百度很多 这里不再详述
需要注意 运行项目前,必须要发一条消息(任意内容皆可)到bot里面去激活bot

4.填写配置文件

新建文本文件并重命名为 config.yml 请根据注释填写以下配置文件,注意整体格式,不要随意删减空格

tasks:
  #自动签到
  sign_in:
    auto_sign_in:
      user-agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36'
      max_workers: 1
      get_messages: no #设为no跳过获取未读信息。默认no
      get_details: yes #设为no跳过获取统计。默认yes      
      aipocr:  #baidu ocr参数
        app_id: ''
        api_key: ''
        secret_key: ''
      sites:
      #以下为具体站点设置 
      #以下为常见示例 具体以https://github.com/madwind/flexget_qbittorrent_mod/blob/master/config_example.yml#L36 下的示例为准 
      #主域名: cookie 
        1ptba: xxxxxxxx
      #部分cookie过期太快,而改用模拟登陆的站点,如以下站点 无此站点的请删除,请删除
        filelist:
          login:
            username: xxxxxxxx
            password: xxxxxxxx
        hdpost:
          login:
            usernameOrEmail: xxxxxxxx
            password: xxxxxxxx
        ourbits:
          # ourbits 在同时配置了cookie 和 login 时,会忽略login 使用cookie签到 
          cookie: xxxxxxxx
          login:
            username: xxxxxxxx
            password: xxxxxxxx
        skyey2:
          login:
            username: xxxxxxxx
            password: xxxxxxxx
        m-team:
          secret_key: <secret_key>
          #二次验证, 扫描二维码得到文本 otpauth://totp/*****:****?secret=[secret_key]&issuer=***** (只取[secret_key]部分)
          login:
            username: 'xxxxxxxx'
            password: 'xxxxxxxx'
           
        #u2特殊设置 无此站点的请删除
        dmhy:
          username: <username>
          cookie: 'xxxxxxx'
          # 五个字符以上签到留言
          comment: <comment>
          ocr_config:
            # 重试次数
            retry: 3
            # 最低识别字符数
            char_count: 3
            # 最低匹配分数
            score: 50     
    accept_all: yes
    seen:
      fields:
        - title
    notify:
      task:
        always_send: true
        message: |+
          {%- if task.accepted -%}
          {%- for group in task.accepted|groupby('task') -%}
          FlexGet has just signed in {{ group.list|length }} sites for task {{ group.grouper }}:
          {% for entry in group.list %}
          {{ loop.index }}: {{ entry.title }} {{ entry.result }}
          {%- if entry.messages|d('') %}
          Messages: {{ entry.messages }}
          {% endif %}
          {%- endfor -%}
          {%- endfor -%}
          {%- endif -%}
          {%- if task.failed %}
          {% for group in task.failed|groupby('task') %}
          The following sites have failed for task {{ group.grouper }}:
          {% for entry in group.list %}
          {{ loop.index }}: {{ entry.title }} Reason: {{ entry.reason|d('unknown') }}
          {%- if entry.messages|d('') %}
          Messages: {{ entry.messages }}
          {% endif %}
          {%- endfor -%}
          {%- endfor -%}
          {%- endif -%}
        via: #推送渠道选择 选择你需要的推送渠道 将不需要的删掉
          - wecom:  #微信
              corp_id: ''
              corp_secret: ''
              agent_id: ''
              to_user: ''
              image: 'details_report.png' 
          - telegram_mod: #tg
              bot_token: ''
              image: 'details_report.png'
              recipients:
                - username: '' #注意这里是用户名,不是昵称,不带@
        

5.打包并上传至私人仓库

5.1 将其配置文件压缩成为 .zip 压缩文件,压缩文件命名为config.zip

5.2 新建私人仓库,并将其命名为PT_signin_data 上传压缩文件 new new new new

6.获取github_api_token

见下图

token token token

7. 进入阿里云云函数并创建函数

7.1创建函数

登录后打开阿里云云函数控制台并开通服务

打开香港地区控制台并创建函数 如下图示

ali

选择对应配置

ali ali 复制文件 https://github.com/lhllhx/PT_signin/raw/AliYun/index.py 内所有内容并覆盖到云函数的编辑框并部署 ali

填写环境变量github_date_repositorygithub_token github_date_repository: 你存储zip的私人仓库全名 格式为你的用户名/仓库名 如:abc/PT_signin_data
github_token:你的github_token 如:ghp_abcdabcdabcdacbd

ali ali

7.2安装依赖

创建层并在线安装依赖 依赖列表见 https://github.com/lhllhx/PT_signin/raw/AliYun/requirements.txt ali ali ali 创建完成后选上 ali 7.3修改超时时间为180秒,如站点较多 可能需要进一步加长 ali 7.4回到配置主页面 点击测试函数 运行时间较长 请耐心等待 如运行正常则可下一步 ali 7.5添加定时触发器 ali

恭喜 到此部署完毕

🔍结果

当你完成上述流程,可以在调用日志查看部分运行日志

私人仓库里的压缩包也有部分运行日志可供参考。

注意:运行通过并不代表配置完全没有问题,请以最终结果和日志为准。

💰计费相关

计算资源免费额度完全可以覆盖。流量费用,经过实测 阿里云云函数流量账单会每天结算一次,只要一个小时内未达到0.01元则费用会被抹零。本项目一次只使用了不到0.001元,无需担心产生计费 阿里云计费有变动 请以实际为准

🔄同步

因为接口请求上可能发生一些变化,所以上游源代码需要作出更改来适配这些变化,如果你没有及时同步项目源代码,可能会导致签到失败。 本项目默认开启自动同步.

项目默认使用分支 lhllhx/flexget_qbittorrent_mod ,该分支会自动每隔数小时同步上游项目flexget_qbittorrent_mod

⚠️开启自动同步后存在的风险:

开发者账号泄露后,用户会被供应链攻击的风险。用户在使用本软件时应该默认进行代码审查,然后手动在自己的Repo里PR进行更新。现在的则跳过了这一用户授权更新的动作。

若你不想承担自动同步带来的可能的风险,请自行修改,审查和更新上游项目

  • 如果你看不懂上面是什么意思,不用理会即可

📌其他事项和常见问题

1.本项目基于flexget_qbittorrent_mod制作,对其使用有相关疑问可以在原项目提出
2.原项目相关wiki:auto_sign_in wecom遇到相关问题可以自行查阅
3.使用tg机器人发送消息时,第一次运行项目前,必须由你发送一条消息到bot,从发送消息到运行程序不能间隔过久(仅首次运行需要)
4.使用tg机器人发送消息时,请注意不是所有人都有用户名(username),请自行了解你是否有用户名
5.因原项目限制,一天只能推送一次,如果想重复测试,请删除私人仓库里的压缩文件并重新上传
6.由于阿里云的未知bug,请不要频繁测试函数 每次测试请间隔1分钟

📑协议

使用 PTsignin 即表明,您知情并同意:

  • 此代码通过模拟浏览器使用 Cookies 登录pt站点页面,实现自动签到和数据统计。使用时确保遵守站点相关规定。
  • 您使用PTsignin造成的一切损失,与PTsignin无关。
  • 用户之 Cookie 被储存于 Github 与 阿里云 服务器。若 Github 或 阿里云 服务器被攻破,则您的 Cookie 有遭到泄露的风险。禁用自动同步的情况下,开发者无权获取您的 Cookie

❤️感谢

本项目基于项目flexget_qbittorrent_mod建立,感谢其所作出的贡献。

Star

Stargazers over time

pt_signin's People

Contributors

lhllhx avatar vivodi avatar

Stargazers

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

Watchers

 avatar  avatar

pt_signin's Issues

近期失效声明

啥也没动,昨天就签到不了了

2021-08-12 13:10:36 DEBUG manager Figuring out config load paths
2021-08-12 13:10:36 DEBUG manager Found config: /home/runner/.flexget/config.yml
2021-08-12 13:10:36 DEBUG manager Config file /home/runner/.flexget/config.yml selected
2021-08-12 13:10:36 DEBUG manager sys.defaultencoding: utf-8
2021-08-12 13:10:36 DEBUG manager sys.getfilesystemencoding: utf-8
2021-08-12 13:10:36 DEBUG manager flexget detected io encoding: utf-8
2021-08-12 13:10:36 DEBUG manager os.path.supports_unicode_filenames: False
2021-08-12 13:10:36 DEBUG plugin Trying to load plugins from: ['/home/runner/.flexget/plugins', '/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/flexget/plugins']
2021-08-12 13:10:36 CRITICAL plugin Plugin flexget.plugins.html_rss failed to import dependencies
Traceback (most recent call last):

为 index.py 添加异常捕获

第一次测试忘记去除 config.zip 密码

第二次测试时 this line 报错 "File existed"

应该是上一实例未销毁造成的

建议在源码中加入判断文件是否存在或直接

  try:
        os.chdir('/tmp')
        os.mkdir("/tmp/pass")
    except:
        pass

之后一切正常

Failed to load config file: Did not pass schema validation.

求助大佬
使用账号密码时可以正常运行 telegram也能正常收到消息
加上使用cookie登录的其他站点后就无法通过配置文件有效性检查
日志显示[/tasks/sign_in/auto_sign_in/sites/hdchina] Got {'cookie': 'PHPSESSID=xxxxxxxxxxxxxxxxxx; hdchina=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}, expected: string
重新fork之后测试还是这种情况

我的config.yml如下

  #自动签到
  sign_in:
    auto_sign_in:
      user-agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36'
      max_workers: 1
      get_messages: no #设为no跳过获取未读信息。默认no
      get_details: yes #设为no跳过获取统计。默认yes      
      aipocr:  #baidu ocr参数
        app_id: 'xxx'
        api_key: 'xxx'
        secret_key: 'xxx'
      sites:
      #以下为具体站点设置 
      #https://github.com/lhllhx/flexget_qbittorrent_mod/tree/master/ptsites 下存在需要的站点 只需配置相应的 主域名: cookie 
        hdchina:
          cookie: 'PHPSESSID=xxxxxxxxxxxxx; hdchina=xxxxxxxxxxxxxxx'
        m-team:
          login:
            username: 'xxxxxx'
            password: 'xxxxxx'
            secret_key: 'xxxxxxxxxxxxxxxxxxxxxxxx'
    accept_all: yes
    seen:
      fields:
        - title
    notify:
      task:
        always_send: true
        message: |+
          {%- if task.accepted -%}
          {%- for group in task.accepted|groupby('task') -%}
          FlexGet has just signed in {{ group.list|length }} sites for task {{ group.grouper }}:
          {% for entry in group.list %}
          {{ loop.index }}: {{ entry.title }} {{ entry.result }}
          {%- if entry.messages|d('') %}
          Messages: {{ entry.messages }}
          {% endif %}
          {%- endfor -%}
          {%- endfor -%}
          {%- endif -%}
          {%- if task.failed %}
          {% for group in task.failed|groupby('task') %}
          The following sites have failed for task {{ group.grouper }}:
          {% for entry in group.list %}
          {{ loop.index }}: {{ entry.title }} Reason: {{ entry.reason|d('unknown') }}
          {%- if entry.messages|d('') %}
          Messages: {{ entry.messages }}
          {% endif %}
          {%- endfor -%}
          {%- endfor -%}
          {%- endif -%}
        via: #推送渠道选择 选择你需要的推送渠道 将不需要的删掉
          - telegram_mod: #tg
              bot_token: 'xxxxxx'
              image: 'details_report.png'
              recipients:
                - username: 'xxxxxx' #注意这里是用户名,不是昵称,不带@

flexget.log

2021-12-09 14:44:47 DEBUG    manager                       config_base: /home/runner/.flexget
2021-12-09 14:44:47 CRITICAL manager                       [/tasks/sign_in/auto_sign_in/sites/hdchina] Got `{'cookie': 'PHPSESSID=xxxxxxxxxxxxxxxxxx; hdchina=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}`, expected: string
2021-12-09 14:44:47 DEBUG    manager                       invalid config, rolling back
2021-12-09 14:44:47 CRITICAL manager                       Failed to load config file: Did not pass schema validation.
2021-12-09 14:44:47 DEBUG    manager                       Removed /home/runner/.flexget/.config-lock

项目搬迁相关讨论

近期GitHub官方对action签到使用趋向严格,本项目有毙命的风险。但是国内云函数均不支持python3.8(原项目需要python3.8实现),国外则需要信用卡验证等繁琐验证。

各位有什么建议的请在此讨论一下


9.22 edit:
项目目前计划搬去腾讯云或者heroku 尽量都采用免费套餐 有什么意见或建议 欢迎提出

2022.7.25 edit
阿里云函数分支已更新,请有兴趣的用户到新分支上测试。到时会逐渐切换到云函数上面,GitHub Action 将不再维护。
https://github.com/lhllhx/PT_signin/tree/AliYun

下面的建议我都看了 建议的平台都存在着不少的限制 目前来看阿里云是比较好的选择

签到成功,但是发送 TG 消息 timeout

已经去掉了个人信息,日志如下,详细日志请看附件:

2021-05-17 03:22:37 DEBUG    telegram.vendor.ptb_urllib3.urllib3.connectionpool sign_in         https://api.telegram.org:443 "GET /bot1634587108:AAE47XMdyGzYgtkOgr9sYbbgcBGHzN_CUxE/getMe HTTP/1.1" 200 211
2021-05-17 03:22:37 DEBUG    telegram.bot  sign_in         {'id': 1634587108, 'first_name': '签到通知', 'is_bot': True, 'username': 'sss_daily_bot', 'can_join_groups': True, 'can_read_all_group_messages': False, 'supports_inline_queries': False}
2021-05-17 03:22:37 DEBUG    telegram.bot  sign_in         Exiting: get_me
2021-05-17 03:22:37 DEBUG    telegram      sign_in         loading cached chat ids
2021-05-17 03:22:37 DEBUG    telegram      sign_in         found 0 cached chat_ids: []
2021-05-17 03:22:37 DEBUG    telegram      sign_in         loading new chat ids
2021-05-17 03:22:37 DEBUG    telegram.bot  sign_in         Entering: get_updates
2021-05-17 03:22:39 ERROR    notify_entry  sign_in         Timed out

flexget.log

我的配置文件 tg 的 username 那里使用的是我的 TG用户名(不含 @ )

成功登入无推送信息

大佬,成功签到了,但是Tg无推送,yaml格式检查已通过
- telegram_mod:
bot_token: 'token' #此处填了bot的token
image: 'details_report.png'
recipients:
- username: '@' #此处填了bot所有者用户名

阿里云测试函数时报错

阿里云测试函数时报错,上传的是zip压缩包呀

{
"errorMessage": "File is not a zip file",
"errorType": "BadZipFile",
"stackTrace": [
[
"File "/code/index.py"",
"line 40",
"in handler",
"zipFile = zipfile.ZipFile('/tmp/config.zip')"
],
[
"File "/var/fc/lang/python3.9/lib/python3.9/zipfile.py"",
"line 1257",
"in init",
"self._RealGetContents()"
],
[
"File "/var/fc/lang/python3.9/lib/python3.9/zipfile.py"",
"line 1324",
"in _RealGetContents",
"raise BadZipFile("File is not a zip file")"
]
]
}

pt学校签到失败

1: btschool 2021-03-08 Reason: Details=> detail: join_date not found.

查看log日志有以上报错,检查cookie没问题。

定时任务执行失败

如题:
在执行rezip的时候出现如下异常,

0s
Run cd $GITHUB_WORKSPACE
cp: cannot stat '/home/runner/.flexget/*.log': No such file or directory
Error: Process completed with exit code 1.

希望大佬帮忙看下

提示:OSError: invalid ppem value,无法生成report以及发送消息

为防止浪费你我时间 在添加issue前 请确保已阅读以下内容

1.运行有误时,请重新阅读项目readme并检查配置流程是否完整
答:已经重新核对了一遍,流程是完整且一致的
2.提交issues时,请详细表达你遇到的问题 比如不能签到 已经签到,但不能发送消息等。并提交你的配置文件和压缩包里的log文件中
答:可以签到成功,但是无法生成report以及发送消息。提示:OSError: invalid ppem value,日志中的隐私信息已经去掉了,完整的日志已经上传。

flexget.log

请求馒头时, 出现503问题

请求馒头时, 出现503问题.
1: m-team 2022-07-06 Reason: Sign_in=> response.status_code=503
这个问题存在约一周左右了, 希望大佬能关注一下这个问题, 如果该问题已知, 那么请忽略这个Issue.

Exception while loading plugin flexget.plugins.auto_sign_in

签到出错了这个是代码版本更新的原因吗

2022-05-25 20:07:03 DEBUG manager Figuring out config load paths
2022-05-25 20:07:03 DEBUG manager Found config: /home/runner/.flexget/config.yml
2022-05-25 20:07:03 DEBUG manager Config file /home/runner/.flexget/config.yml selected
2022-05-25 20:07:03 DEBUG manager sys.defaultencoding: utf-8
2022-05-25 20:07:03 DEBUG manager sys.getfilesystemencoding: utf-8
2022-05-25 20:07:03 DEBUG manager flexget detected io encoding: utf-8
2022-05-25 20:07:03 DEBUG manager os.path.supports_unicode_filenames: False
2022-05-25 20:07:03 DEBUG plugin Trying to load plugins from: ['/home/runner/.flexget/plugins', '/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/plugins']
2022-05-25 20:07:03 CRITICAL plugin Exception while loading plugin flexget.plugins.auto_sign_in
Traceback (most recent call last):

File "/opt/hostedtoolcache/Python/3.8.12/x64/bin/flexget", line 8, in
sys.exit(main())
│ │ └ <function main at 0x7fd0b6a27af0>
│ └
└ <module 'sys' (built-in)>
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/init.py", line 44, in main
manager.start()
│ └ <function Manager.start at 0x7fd0ae5f3e50>
└ <flexget.manager.Manager object at 0x7fd0ae5f7250>
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/manager.py", line 382, in start
self.initialize()
│ └ <function Manager.initialize at 0x7fd0ae5f3c10>
└ <flexget.manager.Manager object at 0x7fd0ae5f7250>
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/manager.py", line 224, in initialize
plugin.load_plugins(
│ └ <function load_plugins at 0x7fd0aecfb310>
└ <module 'flexget.plugin' from '/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/plugin.py'>
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/plugin.py", line 550, in load_plugins
_load_plugins_from_dirs(extra_plugins)
│ └ ['/home/runner/.flexget/plugins', '/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/plugins']
└ <function _load_plugins_from_dirs at 0x7fd0aecfb5e0>
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/plugin.py", line 468, in _load_plugins_from_dirs
_import_plugin(module_name, plugin_path)
│ │ └ PosixPath('/home/runner/.flexget/plugins/auto_sign_in.py')
│ └ 'flexget.plugins.auto_sign_in'
└ <function _import_plugin at 0x7fd0aecfb040>

File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/flexget/plugin.py", line 419, in _import_plugin
import_module(module_name)
│ └ 'flexget.plugins.auto_sign_in'
└ <function import_module at 0x7fd0b6cff040>
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'flexget.plugins.auto_sign_in'
│ └ <function _gcd_import at 0x7fd0b6e29430>
└ <module 'importlib._bootstrap' (frozen)>
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed

File "/home/runner/.flexget/plugins/auto_sign_in.py", line 10, in
from .ptsites import executor

File "/home/runner/.flexget/plugins/ptsites/executor.py", line 9, in
from .base.sign_in import sign_in

File "/home/runner/.flexget/plugins/ptsites/base/sign_in.py", line 6, in
from .base import Work

File "/home/runner/.flexget/plugins/ptsites/base/base.py", line 27, in
class Work:

File "/home/runner/.flexget/plugins/ptsites/base/base.py", line 29, in Work
succeed_regex: Union[list[Union[str, tuple]], tuple[str, int]] = None, fail_regex: str = None,
│ └ typing.Union
└ typing.Union

TypeError: 'type' object is not subscriptable
2022-05-25 20:07:03 DEBUG manager Removed /home/runner/.flexget/.config-lock

##[error]Process completed with exit code 1.

求助:

我的配置上传了,然后点了 Star,看到 build 是绿色的,以为签到通过,但是检查完整日志时,看到实际操作终止了,如下是片段日志:

2021-05-15T14:49:26.5548460Z Archive:  config.zip
2021-05-15T14:49:26.5549413Z   inflating: config.yml              
2021-05-15T14:49:26.5771072Z ##[group]Run cd ~/.flexget
2021-05-15T14:49:26.5771641Z �[36;1mcd ~/.flexget�[0m
2021-05-15T14:49:26.5772270Z �[36;1mflexget --loglevel debug execute >/dev/null 2>&1    �[0m
2021-05-15T14:49:26.5808793Z shell: /bin/bash -e {0}
2021-05-15T14:49:26.5809227Z env:
2021-05-15T14:49:26.5810028Z   pythonLocation: /opt/hostedtoolcache/Python/3.8.10/x64
2021-05-15T14:49:26.5811341Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.10/x64/lib
2021-05-15T14:49:26.5811943Z ##[endgroup]
2021-05-15T14:49:32.6149464Z ##[error]Process completed with exit code 1.

以下是附上上下文比较完整的配置文件:


2021-05-15T14:49:26.5397075Z ##[group]Run touch db-config.sqlite
2021-05-15T14:49:26.5397842Z �[36;1mtouch db-config.sqlite�[0m
2021-05-15T14:49:26.5398432Z �[36;1munzip -P $zip -o config.zip �[0m
2021-05-15T14:49:26.5399284Z �[36;1mrm -f  config.zip�[0m
2021-05-15T14:49:26.5399885Z �[36;1mcp -r  $GITHUB_WORKSPACE/.flexget/ ~/.flexget�[0m
2021-05-15T14:49:26.5400673Z �[36;1mcp -r  config.yml ~/.flexget�[0m
2021-05-15T14:49:26.5401273Z �[36;1mcp -r  db-config.sqlite ~/.flexget�[0m
2021-05-15T14:49:26.5401875Z �[36;1mrm -f  db-config.sqlite�[0m
2021-05-15T14:49:26.5402389Z �[36;1mrm -f  config.yml�[0m
2021-05-15T14:49:26.5402808Z �[36;1mrm -f  *.log�[0m
2021-05-15T14:49:26.5438561Z shell: /bin/bash -e {0}
2021-05-15T14:49:26.5438984Z env:
2021-05-15T14:49:26.5439573Z   pythonLocation: /opt/hostedtoolcache/Python/3.8.10/x64
2021-05-15T14:49:26.5440367Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.10/x64/lib
2021-05-15T14:49:26.5441731Z   zip: ***
2021-05-15T14:49:26.5442118Z ##[endgroup]
2021-05-15T14:49:26.5548460Z Archive:  config.zip
2021-05-15T14:49:26.5549413Z   inflating: config.yml              
2021-05-15T14:49:26.5771072Z ##[group]Run cd ~/.flexget
2021-05-15T14:49:26.5771641Z �[36;1mcd ~/.flexget�[0m
2021-05-15T14:49:26.5772270Z �[36;1mflexget --loglevel debug execute >/dev/null 2>&1    �[0m
2021-05-15T14:49:26.5808793Z shell: /bin/bash -e {0}
2021-05-15T14:49:26.5809227Z env:
2021-05-15T14:49:26.5810028Z   pythonLocation: /opt/hostedtoolcache/Python/3.8.10/x64
2021-05-15T14:49:26.5811341Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.10/x64/lib
2021-05-15T14:49:26.5811943Z ##[endgroup]
2021-05-15T14:49:32.6149464Z ##[error]Process completed with exit code 1.
2021-05-15T14:49:32.6210869Z ##[group]Run cd $GITHUB_WORKSPACE
2021-05-15T14:49:32.6211842Z �[36;1mcd $GITHUB_WORKSPACE�[0m
2021-05-15T14:49:32.6213490Z �[36;1mcp -r ~/.flexget/db-config.sqlite $GITHUB_WORKSPACE�[0m
2021-05-15T14:49:32.6214349Z �[36;1mcp -r ~/.flexget/config.yml $GITHUB_WORKSPACE�[0m
2021-05-15T14:49:32.6215034Z �[36;1mcp -r ~/.flexget/*.log $GITHUB_WORKSPACE�[0m
2021-05-15T14:49:32.6216002Z �[36;1mzip -P $zip config.zip config.yml db-config.sqlite *.log�[0m
2021-05-15T14:49:32.6250076Z shell: /bin/bash -e {0}
2021-05-15T14:49:32.6250521Z env:
2021-05-15T14:49:32.6251135Z   pythonLocation: /opt/hostedtoolcache/Python/3.8.10/x64
2021-05-15T14:49:32.6252465Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.10/x64/lib
2021-05-15T14:49:32.6254065Z   zip: ***
2021-05-15T14:49:32.6254451Z ##[endgroup]
2021-05-15T14:49:32.6461360Z   adding: config.yml (deflated 45%)
2021-05-15T14:49:32.6544788Z   adding: db-config.sqlite (deflated 98%)
2021-05-15T14:49:32.6557793Z   adding: flexget.log (deflated 79%)
2021-05-15T14:49:32.6598212Z ##[group]Run rm -f config.yml
2021-05-15T14:49:32.6599282Z �[36;1mrm -f config.yml�[0m
2021-05-15T14:49:32.6599838Z �[36;1mrm -f db-config.sqlite�[0m
2021-05-15T14:49:32.6600508Z �[36;1mrm -f *.log�[0m
2021-05-15T14:49:32.6600967Z �[36;1m#rm -rf /.flexget �[0m
2021-05-15T14:49:32.6637894Z shell: /bin/bash -e {0}
2021-05-15T14:49:32.6638307Z env:
2021-05-15T14:49:32.6638872Z   pythonLocation: /opt/hostedtoolcache/Python/3.8.10/x64
2021-05-15T14:49:32.6639643Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.10/x64/lib
2021-05-15T14:49:32.6640217Z ##[endgroup]

签到失败503

登录503,可能是因为CF套盾的原因,cookie需要同ip user-agent下获取的,但是因为是Actions的原因,既不能获得同IP也不能获得UA再生成cookie。

卡Unzip了

手动执行action后看到红的错误,进去看是unzip那一步报错了、

image

看了眼其他事项和常见问题有看到unzip的修复但是我这里还是卡住了
我用的bandzip 压缩参数如下

image

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.