改变你
comicUrl的这个
comicUrl = comicElem[0].get('src').strip("http://")comicUrl="http://"+comicUrlif 'xkcd' not in comicUrl: comicUrl=comicUrl[:7]+'xkcd.com/'+comicUrl[7:]print "comic url",comicUrl
改变你
comicUrl的这个
comicUrl = comicElem[0].get('src').strip("http://")comicUrl="http://"+comicUrlif 'xkcd' not in comicUrl: comicUrl=comicUrl[:7]+'xkcd.com/'+comicUrl[7:]print "comic url",comicUrl