Chào các bác.Nhò các bác chỉ giúp !!!
import urllib.requests
import re
url = urllib.requests.urlopen("http://www.python.org")
s = url.read()
regex = '<title>(.+?)</title>'
reg = re.compile(regex)
tile = re.findall(reg,str(s))
print (title)
và đây là lỗi của nó:
line 1, in <module>
import urllib.requests
ImportError: No module named requests
- Theo em hiểu thì nó bao không có module request.mặc dù là em đã cài thông qua cmd rồi.
Mong mọi người giúp đỡ.