Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

阡陌居 评论区 #685

Open
FellBan opened this issue Jul 3, 2024 · 6 comments
Open

阡陌居 评论区 #685

FellBan opened this issue Jul 3, 2024 · 6 comments
Labels

Comments

@FellBan
Copy link
Contributor

FellBan commented Jul 3, 2024

HAR 模板名称

阡陌居

作者信息

李大爷

模板备注及说明

Cookie 日志显示

HAR 文件名

阡陌居.har

其他信息

No response

HAR 模板内容

[{"request":{"method":"GET","url":"http://www.1000qm.vip/","headers":[{"name":"Host","value":"www.1000qm.vip"},{"name":"Connection","value":"keep-alive"},{"name":"Cache-Control","value":"max-age=0"},{"name":"DNT","value":"1"},{"name":"Upgrade-Insecure-Requests","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.160 Safari/537.36"},{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Referer","value":"http://www.1000qm.vip/home.php?mod=spacecp&ac=avatar"},{"name":"Accept-Encoding","value":"gzip, deflate"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9"},{"name":"Cookie","value":"{{cookie}}"}],"cookies":[],"data":"","mimeType":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"formhash","re":"name=\"formhash\" value=\"(.+)\"","from":"content"}]}},{"request":{"method":"POST","url":"http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1","headers":[{"name":"Host","value":"www.1000qm.vip"},{"name":"Connection","value":"keep-alive"},{"name":"Cache-Control","value":"max-age=0"},{"name":"Origin","value":"http://www.1000qm.vip"},{"name":"DNT","value":"1"},{"name":"Upgrade-Insecure-Requests","value":"1"},{"name":"Content-Type","value":"application/x-www-form-urlencoded"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.160 Safari/537.36"},{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Referer","value":"http://www.1000qm.vip/plugin.php?id=dsu_paulsign:sign"},{"name":"Accept-Encoding","value":"gzip, deflate"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9"},{"name":"Cookie","value":"{{cookie}}"}],"cookies":[],"data":"formhash={{formhash|urlencode}}&qdxq=yl","mimeType":"application/x-www-form-urlencoded"},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"__log__","re":"<div class=\"c\">([^>]+)<","from":"content"}]}}]
@wzgrx
Copy link

wzgrx commented Jul 4, 2024

Failed at 2/2 request,
Fail assert: {"re": "200", "from": "status"} from success_asserts,
Response Error : HTTP 502: Bad Gateway,
Request URL: http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1

@wzgrx
Copy link

wzgrx commented Jul 4, 2024

签到错误,不知道啥问题

@FellBan
Copy link
Contributor Author

FellBan commented Jul 4, 2024

签到错误,不知道啥问题

image
正常

@wzgrx
Copy link

wzgrx commented Jul 4, 2024

签到错误,不知道啥问题

image 正常
Failed at 2/2 request,
Fail assert: {"re": "200", "from": "status"} from success_asserts,
Response Error : HTTP 502: Bad Gateway,
Request URL: http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1

还是不行,不知道为什么
你遇到的错误表明在请求 URL 时,返回了 HTTP 502 错误(Bad Gateway)。502 错误通常表示服务器作为网关或代理从上游服务器收到无效响应。这里是一些可能的原因和解决方法:

常见原因

  1. 服务器问题: 上游服务器可能有问题,导致网关或代理无法获取有效响应。
  2. 网络问题: 网络连接问题或防火墙阻止了请求的正常流动。
  3. 服务器配置问题: 服务器配置错误,导致无法正确处理请求。

解决方法

1. 重试请求

有时候,502 错误是暂时的,可以通过稍后重试来解决。

import time
import requests

url = "http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}

for _ in range(3):  # 重试3次
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        print("Success: Received 200 status code")
        break
    else:
        print(f"Failed: Received {response.status_code} status code, retrying...")
        time.sleep(5)  # 等待5秒后重试
else:
    print("Failed: Max retries exceeded")

2. 检查请求方法和参数

确保你使用的 HTTP 方法和请求参数是正确的。某些请求可能需要特定的参数才能正确响应。

response = requests.get(url, headers=headers)
if response.status_code == 200:
    print("Success: Received 200 status code")
else:
    print(f"Failed: Received {response.status_code} status code")
    print(response.text)  # 打印响应内容以查看详细错误信息

3. 检查服务器状态

检查服务器是否正在运行,并且没有宕机或其他问题。可以尝试访问服务器的其他页面,看看是否也有类似的问题。

4. 使用代理

有时候,使用代理服务器可以绕过一些网络问题。

proxies = {
    "http": "http://your_proxy.com:port",
    "https": "https://your_proxy.com:port"
}

response = requests.get(url, headers=headers, proxies=proxies)
if response.status_code == 200:
    print("Success: Received 200 status code")
else:
    print(f"Failed: Received {response.status_code} status code")

5. 联系服务器管理员

如果问题持续存在,可能需要联系服务器管理员或网站支持团队,告知他们遇到的错误,以便他们检查和解决问题。

示例代码

这是一个完整的示例代码,结合了上述的一些建议:

import requests
import time

url = "http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}

for _ in range(3):  # 重试3次
    try:
        response = requests.get(url, headers=headers)
        if response.status_code == 200:
            print("Success: Received 200 status code")
            break
        else:
            print(f"Failed: Received {response.status_code} status code")
            print(response.text)  # 打印响应内容以查看详细错误信息
    except requests.exceptions.RequestException as e:
        print(f"Request failed: {e}")
    time.sleep(5)  # 等待5秒后重试
else:
    print("Failed: Max retries exceeded")

通过这些方法,你应该能够更好地理解和解决 HTTP 502 错误。如果问题仍然存在,请提供更多详细信息,以便进一步诊断和帮助。

@FellBan
Copy link
Contributor Author

FellBan commented Jul 5, 2024

签到错误,不知道啥问题

image 正常
Failed at 2/2 request,
Fail assert: {"re": "200", "from": "status"} from success_asserts,
Response Error : HTTP 502: Bad Gateway,
Request URL: http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1

还是不行,不知道为什么 你遇到的错误表明在请求 URL 时,返回了 HTTP 502 错误(Bad Gateway)。502 错误通常表示服务器作为网关或代理从上游服务器收到无效响应。这里是一些可能的原因和解决方法:

常见原因

  1. 服务器问题: 上游服务器可能有问题,导致网关或代理无法获取有效响应。
  2. 网络问题: 网络连接问题或防火墙阻止了请求的正常流动。
  3. 服务器配置问题: 服务器配置错误,导致无法正确处理请求。

解决方法

1. 重试请求

有时候,502 错误是暂时的,可以通过稍后重试来解决。

import time
import requests

url = "http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}

for _ in range(3):  # 重试3次
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        print("Success: Received 200 status code")
        break
    else:
        print(f"Failed: Received {response.status_code} status code, retrying...")
        time.sleep(5)  # 等待5秒后重试
else:
    print("Failed: Max retries exceeded")

2. 检查请求方法和参数

确保你使用的 HTTP 方法和请求参数是正确的。某些请求可能需要特定的参数才能正确响应。

response = requests.get(url, headers=headers)
if response.status_code == 200:
    print("Success: Received 200 status code")
else:
    print(f"Failed: Received {response.status_code} status code")
    print(response.text)  # 打印响应内容以查看详细错误信息

3. 检查服务器状态

检查服务器是否正在运行,并且没有宕机或其他问题。可以尝试访问服务器的其他页面,看看是否也有类似的问题。

4. 使用代理

有时候,使用代理服务器可以绕过一些网络问题。

proxies = {
    "http": "http://your_proxy.com:port",
    "https": "https://your_proxy.com:port"
}

response = requests.get(url, headers=headers, proxies=proxies)
if response.status_code == 200:
    print("Success: Received 200 status code")
else:
    print(f"Failed: Received {response.status_code} status code")

5. 联系服务器管理员

如果问题持续存在,可能需要联系服务器管理员或网站支持团队,告知他们遇到的错误,以便他们检查和解决问题。

示例代码

这是一个完整的示例代码,结合了上述的一些建议:

import requests
import time

url = "http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}

for _ in range(3):  # 重试3次
    try:
        response = requests.get(url, headers=headers)
        if response.status_code == 200:
            print("Success: Received 200 status code")
            break
        else:
            print(f"Failed: Received {response.status_code} status code")
            print(response.text)  # 打印响应内容以查看详细错误信息
    except requests.exceptions.RequestException as e:
        print(f"Request failed: {e}")
    time.sleep(5)  # 等待5秒后重试
else:
    print("Failed: Max retries exceeded")

通过这些方法,你应该能够更好地理解和解决 HTTP 502 错误。如果问题仍然存在,请提供更多详细信息,以便进一步诊断和帮助。

你签到是不是搭建在服务器上面的?

@wzgrx
Copy link

wzgrx commented Jul 5, 2024

签到错误,不知道啥问题

image 正常
Failed at 2/2 request,
Fail assert: {"re": "200", "from": "status"} from success_asserts,
Response Error : HTTP 502: Bad Gateway,
Request URL: http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1

还是不行,不知道为什么 你遇到的错误表明在请求 URL 时,返回了 HTTP 502 错误(Bad Gateway)。502 错误通常表示服务器作为网关或代理从上游服务器收到无效响应。这里是一些可能的原因和解决方法:

常见原因

  1. 服务器问题: 上游服务器可能有问题,导致网关或代理无法获取有效响应。
  2. 网络问题: 网络连接问题或防火墙阻止了请求的正常流动。
  3. 服务器配置问题: 服务器配置错误,导致无法正确处理请求。

解决方法

1. 重试请求

有时候,502 错误是暂时的,可以通过稍后重试来解决。

import time
import requests

url = "http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}

for _ in range(3):  # 重试3次
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        print("Success: Received 200 status code")
        break
    else:
        print(f"Failed: Received {response.status_code} status code, retrying...")
        time.sleep(5)  # 等待5秒后重试
else:
    print("Failed: Max retries exceeded")

2. 检查请求方法和参数

确保你使用的 HTTP 方法和请求参数是正确的。某些请求可能需要特定的参数才能正确响应。

response = requests.get(url, headers=headers)
if response.status_code == 200:
    print("Success: Received 200 status code")
else:
    print(f"Failed: Received {response.status_code} status code")
    print(response.text)  # 打印响应内容以查看详细错误信息

3. 检查服务器状态

检查服务器是否正在运行,并且没有宕机或其他问题。可以尝试访问服务器的其他页面,看看是否也有类似的问题。

4. 使用代理

有时候,使用代理服务器可以绕过一些网络问题。

proxies = {
    "http": "http://your_proxy.com:port",
    "https": "https://your_proxy.com:port"
}

response = requests.get(url, headers=headers, proxies=proxies)
if response.status_code == 200:
    print("Success: Received 200 status code")
else:
    print(f"Failed: Received {response.status_code} status code")

5. 联系服务器管理员

如果问题持续存在,可能需要联系服务器管理员或网站支持团队,告知他们遇到的错误,以便他们检查和解决问题。

示例代码

这是一个完整的示例代码,结合了上述的一些建议:

import requests
import time

url = "http://www.1000qm.vip/plugin.php?id=dsu_paulsign%3Asign&operation=qiandao&infloat=1&inajax=1"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}

for _ in range(3):  # 重试3次
    try:
        response = requests.get(url, headers=headers)
        if response.status_code == 200:
            print("Success: Received 200 status code")
            break
        else:
            print(f"Failed: Received {response.status_code} status code")
            print(response.text)  # 打印响应内容以查看详细错误信息
    except requests.exceptions.RequestException as e:
        print(f"Request failed: {e}")
    time.sleep(5)  # 等待5秒后重试
else:
    print("Failed: Max retries exceeded")

通过这些方法,你应该能够更好地理解和解决 HTTP 502 错误。如果问题仍然存在,请提供更多详细信息,以便进一步诊断和帮助。

你签到是不是搭建在服务器上面的?

用的pc docker,网络是本地网络

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants