6dylan6 / jdpro

1.87k stars 289 forks source link

bark 请求可以从get改成post么 #344

Open scccy opened 2 days ago

scccy commented 2 days ago

get 请求body过大 多用户下无法推送

6dylan6 commented 2 days ago

@scccy 哪个?就是post的呀

scccy commented 2 days ago

这是HTTPError: Response code 431 (Request Header Fields Too Large) 然后我去看了sendNotify.js跟sendNotify.py

scccy commented 2 days ago

def bark(title, content): print("\n") if BARK: try: response = requests.get( f"""https://api.day.app/{BARK}/{title}/{urllib.parse.quote_plus(content)}""").json() if response['code'] == 200: print('推送成功!') else: print('推送失败!') except: print('推送失败!') if BARK_PUSH: try: response = requests.get( f"""{BARK_PUSH}/{title}/{urllib.parse.quote_plus(content)}""").json() if response['code'] == 200: print('推送成功!') else: print('推送失败!') except: print('推送失败!') print("bark服务启动") if BARK=='' and BARK_PUSH=='': print("bark服务的bark_token未设置!!\n取消推送") return

scccy commented 2 days ago

Bark APP发送通知调用API失败!!

HTTPError: Response code 431 (Request Header Fields Too Large) at Request. (/ql/node_modules/.pnpm/got@11.8.6/node_modules/got/dist/source/as-promise/index.js:118:42) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_NON_2XX_3XX_RESPONSE', timings: { start: 1719809593488, socket: 1719809593489, lookup: 1719809593553, connect: 1719809593553, secureConnect: undefined, upload: 1719809593553, response: 1719809593557, end: 1719809593558, error: undefined, abort: undefined, phases: { wait: 1, dns: 64, tcp: 0, tls: undefined, request: 0, firstByte: 4, download: 1, total: 70 } } } 这是推送报错

6dylan6 commented 2 days ago

@scccy 分段吧,太多post也不行

scccy commented 2 days ago

@scccy 分段吧,太多post也不行

这个需要我在用户端修改吗

6dylan6 commented 2 days ago

@scccy 什么通知报的

scccy commented 2 days ago

资产统计还有农场 现在jd的推送我都收不到了

6dylan6 commented 1 day ago

@scccy 看readme里,分组通知等用法参考[notify.md]