어제 저는 OSX 10.5에서 feedparser를 설치했으나 정상적으로 작동했지만 작동이 멈췄습니다.Feedparser가 작동을 멈췄습니다.
Traceback (most recent call last):
File "example.py", line 3, in <module>
import feedparser
File "example.py", line 2, in <module>
d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml')
AttributeError: 'module' object has no attribute 'parse'
뿐만 아니라 feedparser을 사용하여 실제 스크립트 작업 같은 오류를 중지 :
이
그것은 나에게이 알려줍니다 (feedparser 문서에서 복사) 스크립트import feedparser
d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml')
d['feed']['title']
u'Sample Feed'
입니다.
자신의 피드 파서로 모듈 이름을 지정 했습니까? –
무슨 뜻인지 정말로 모르겠다. – HankSmackHood
아 잠깐, 무슨 뜻인지 알 겠어. Stupid, 필자는 테스트 스크립트 feedparser.py의 이름을 지정했다. 감사합니다 :) – HankSmackHood