0

I am writing an app for GAE (Python 2.5) and I was wondering if there is any library like PyQuery (which runs on Python 2.6+).

All I have to do is to load an HTML file and get the content of a especific tag through its ID. In PyQuery, or even Python2.6's libraries like lxml, it is very easy, but I don't know how to do that with Python 2.5.

Can someone help me? ^^

Thank you guys. :)

2
  • 1
    PyQuery crucially depends on lxml, which is a third-party library available for Python 2.3 or later, fully including 2.5 and 2.6 -- and unfortunately not available on GAE, see e.g. stackoverflow.com/questions/1894696/python-lxml-on-app-engine . It's not an issue of 2.5 vs 2.6! Please edit your question to fix the wrong assertions and implications in question (which might confuse others), thanks. As for your Q, the existing answers suggesting BeautifulSoup (which is pure-Python and thus just fine for GAE) are fine -- but, be sure to get BS 3.0.8.1, not BS 3.1! Commented Aug 29, 2010 at 0:57
  • What about BeautifulSoup version 3.2.0 with GAE? That's the present version.. Commented Dec 22, 2010 at 23:19

2 Answers 2

4

BeautifulSoup should be what you are looking for.

Sign up to request clarification or add additional context in comments.

Comments

2

BeautifulSoup is a common choice for HTML parsing, and is compatible with Python 2.5.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.