编写一个python程序,我在使用该urllib.urlopen
函数时遇到了这个错误。
Traceback (most recent call last):
File "ChurchScraper.py", line 58, in <module>
html = GetAllChurchPages()
File "ChurchScraper.py", line 48, in GetAllChurchPages
CPs = CPs + urllib.urlopen(url)
TypeError: cannot concatenate 'str' and 'instance' objects
url = 'http://website.com/index.php?cID=' + str(cID)
CPs = CPs + urllib.urlopen(url)