|
|
|
@ -137,11 +137,11 @@ if __name__ == '__main__':
|
|
|
|
|
response = requests.get(url=url, allow_redirects=False, cookies=cookies)
|
|
|
|
|
if 'Location' in response.headers:
|
|
|
|
|
redirect_url = response.headers.get("Location")
|
|
|
|
|
logger.info("重定向URL:", redirect_url)
|
|
|
|
|
logger.info(f"重定向URL:%s"%redirect_url)
|
|
|
|
|
token_match = re.findall(r'token=(\d+)', redirect_url)
|
|
|
|
|
if token_match:
|
|
|
|
|
token = token_match[0]
|
|
|
|
|
logger.info("获取到的token:", token)
|
|
|
|
|
logger.info(f"获取到的token:%s"%token)
|
|
|
|
|
|
|
|
|
|
article_urls = []
|
|
|
|
|
|
|
|
|
|