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

废弃本次代理无效,重试request用的还是失效的代理ip #169

Open
ddzyx opened this issue Sep 10, 2022 · 0 comments
Open

废弃本次代理无效,重试request用的还是失效的代理ip #169

ddzyx opened this issue Sep 10, 2022 · 0 comments

Comments

@ddzyx
Copy link

ddzyx commented Sep 10, 2022

import feapder
from feapder.network.proxy_pool import ProxyPool
from feapder import Request
from datetime import date
from feapder.db.mysqldb import MysqlDB
import time, re
from utils.tengxunCos import tengxunCos
from utils.langconv import *

proxy_pool = ProxyPool(reset_interval_max=1200, reset_interval=300, check_valid=False)
feapder.Request.proxies_pool = proxy_pool

def parse(self, request, response):
movie_id = request.movie_id
if "可播放" in response.text:
。。。。。。。。。
elif "登录跳转" in response.text:
print("检测到有异常请求从您的IP发出,请登录再试")
request.proxies_pool.tag_proxy(request.requests_kwargs.get("proxies"), -1)

request.proxies_pool.tag_proxy(request.requests_kwargs.get("proxies"), -1) 这行代码无效

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

No branches or pull requests

1 participant