0
if data.find('!search') != -1:
nick = data.split('!')[ 0 ].replace(':','')
conn = httplib.HTTPConnection("www.md5.rednoize.com")
conn.request("GET", "?q=" + arg)
response = conn.getresponse()
data = response.read()
result = re.findall('<div id="result" >(.+?)</div', data)
if result:
sck.send('PRIVMSG ' + chan + result + '\r\n')
else:
sck.send('PRIVMSG ' + chan + " :" ' could not find the hash' + '\r\n')
當我運行這段代碼我得到這個錯誤:IRC殭屍類型錯誤(蟒蛇)
conn.request("GET " + "?q=" + arg)
TypeError: cannot concatenate 'str' and 'list' objects
我怎樣才能解決這個問題?