Python 3.x 解析时出现意外的EOF:web刮取
为什么我会犯这个错误 SyntaxError:分析时出现意外的EOFPython 3.x 解析时出现意外的EOF:web刮取,python-3.x,beautifulsoup,Python 3.x,Beautifulsoup,为什么我会犯这个错误 SyntaxError:分析时出现意外的EOF 打印(tag.get('href',none)需要以另一个结尾) 列克: import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup url = input("enter your url here : " ) html = urllib.request.urlopen(url).read() soup =
打印(tag.get('href',none)
需要以另一个结尾)
列克:
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)
是的,谢谢你。结果又是我的疏忽了:“你知道吗(
print(tag.get('href',none))