A beautiful soup runs in a Python shell using Django. I can also successfully import from bs4 import BeautifulSoup into views.py, but when I call something like soup = BeautifulSoup(xml) , I get 502 Bad Gateway error. I spoke with my host and they could not find the problem. Any ideas?
Note that xml has the value xml = urllib2.urlopen("http://isbndb.com/api/books.xml?access_key=000000&results=details&index1=isbn&value1=0000").read() , but it works in the Python shell (in my myproject folder), so I don't think the problem is.
source share