我刚刚开始从YouTube视频中学习网络抓取,我试图从amazon.com抓取网页,但我却遇到了这些错误。 我试图找出出什么问题了,但我无法理解。
import bs4
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
import parser
my_url = 'https://www.amazon.com/s?
uClient = uReq(my_url)
page_html = uClient.read()
uClient.close()
我原本期望HTML输出文件,但是却收到此错误:
File "C:\Users\HP\Anaconda3\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError: Service Unavailable