0
私の単純なpythonファイルで "expected string or buffer"エラーが発生します。私はreddit記事のタイトルを書き留めようとしています。Python urlopen "期待される文字列またはバッファ"
from urllib import urlopen
import re
worldNewsPage = urlopen("https://www.reddit.com/r/worldnews/")
collectTitle = re.compile('<p class="title"><a.*>(.*)</a>')
findTitle = re.findall(collectTitle, worldNewsPage)
listIterator = []
listIterator[:] = range(1,3)
for i in listIterator:
print findTitle
print