# -*- coding: UTF-8 -*-
import urllib.request
import re
import os
os.system("cls")
url=input("Url Link : ")
if(url[0:8]=="https://"):
url=url[:4]+url[5:]
if(url[0:7]!="http://"):
url="http://"+url
try :
try :
value=urllib.request.urlopen(url,timeout=60).read().decode('cp949')
except UnicodeDecodeError :
value=urllib.request.urlopen(url,timeout=60).read().decode('UTF8')
par='<title>(.+?)</title>'
result=re.findall(par,value)
print(result)
except ConnectionResetError as e:
print(e)
TimeoutError消失。但是出现ConnectionResetError。这个错误是什么?它是服务器问题吗?所以它不能解决我?“ConnectionResetError”我该怎么办?
这将是很好,如果你可以添加完整回溯 – The6thSense
主页是[这里](http://jakjeon.icems.kr/main.do) –
@VigneshKalai什么是回溯?我能怎么做? –