Beautiful使用Django在Python shell中工作。我也可以成功地将from bs4 import BeautifulSoup导入到views.py中,但是当我调用像soup = BeautifulSoup(xml)这样的东西时,我得到了一个502Bad Gateway错误。我和我的主人谈过了,他们找不到问题所在。有什么想法吗?
注xml是xml = urllib2.urlopen("http://isbndb.com/api/books.xml?access_key=000000&results=details&index1=isbn&value1=0000").read(),但它在Python shell (在我的项目文件夹中)中工作,所以我认为这不是问题所在。
https://stackoverflow.com/questions/10235579
复制相似问题