我对此完全陌生,它在每个网站上都可以工作,除了这个?知道为什么吗?没有错误,只是永远不会完成。
import requests
import json
from bs4 import BeautifulSoup
page = requests.get("https://www.argos.co.uk/product/8892203/")
print(page)发布于 2021-03-10 23:22:52
这个网站是代理感知的。
你可以用简单的curl来检查它。
curl -s https://www.argos.co.uk/product/8892203/ | head -3返回
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>使用代理集
curl -s -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" https://www.argos.co.uk/product/8892203/ 你得到了合适的网站
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/> ....发布于 2021-03-10 23:19:17
您尝试访问的页面已被阻止,这是您尝试访问该页面时得到的答案:
> <html><head>\n<title>Access Denied</title>\n</head><body>\n<h1>Access
> Denied</h1>\n \nYou don\'t have permission to access
> "http://www.argos.co.uk/product/8892203/" on this
> server.<p>\nReference
> #18.8d0c1502.1615389605.5585b8b\n\n\n</p></body></html>您可以尝试使用代理来屏蔽您的请求,如下所示:
https://stackoverflow.com/questions/66567582
复制相似问题