我试图让BeautifulSoup阅读此页面,但URL没有正确地传递到get()
命令中
URL是https://www.econjobrumors.com/topic/supreme-court-to-%e2%80%9cconsider%e2%80%9d-taking-up-harvard-affirmative-action-case-on-june-10。但是当我尝试使用BeautifulSoup从URL获取数据时,它总是给出一个错误,指出URL不正确
response = requests.get(url = "https://www.econjobrumors.com/topic/supreme-court-to-%e2%80%9cconsider%e2%80%9d-taking-up-harvard-affirmative-action-case-on-june-10",
verify = False \
)
print(response.request.url, end="\r")
是双引号“(U+201C)和”(U+201D)导致了错误。我已经尝试了几个小时,但仍然不知道如何正确传递URL
我将URL周围的双引号改为单引号
按预期打印出html,我对其进行了编辑,使其符合此答案
相关问题 更多 >
编程相关推荐