【发布时间】:2021-01-11 00:11:36
【问题描述】:
import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
url = input("enter your url here : " )
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html,'html.parser')
tags = soup('a')
for tag in tags:
print(tag.get('href',none)
为什么会出现这个错误?
SyntaxError: 解析时出现意外的 EOF
【问题讨论】: