Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin.stu.neva.ru!news2.arglkargh.de!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'preferably': 0.05; 'subject:trying': 0.09; 'subject:using': 0.09; 'dec': 0.15; 'framework,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'input.': 0.16; 'messy': 0.16; 'tweak': 0.16; 'wrote:': 0.17; 'fairly': 0.21; 'header:In-Reply-To:1': 0.25; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'included': 0.29; 'html,': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85.220': 0.35; 'similar': 0.35; 'received:209.85': 0.35; 'possible': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'easy': 0.60; '30,': 0.62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UelZeAxI376dIg1xFAwYV78qN9eRrYMtnHm1o1687Dg=; b=pW5kERvBDPQTd9+pyF5IvxAGYQ4bMSMMagegjbCJJdWy3vsKjr7HLgFgxjaIOkCM3i JBpkIKYE98AdaMP3bE9tAsYT2SYtRvaLO13Fc+idyIaX+CxxvDuu6gQAs4C5GoDslVKn 6oNQaj4ZOcACX2JpYFG1XFkMn7AK5UHftUSjlHCAGfjwY577CrgHTJDz7Rc4C8UdqIn5 0O5nHbvNSbbVP1ff1y92a2IuzbNo41tieQ14QXLBW5nJVwTEXoFhh8tP/KR3COYaNBbw VrtEA3p1usPmRXz3zFGznZa3ykkQYzMqN8opxhWljlFZladbZ6wiuVWSdiq/Bi8HoLD4 ohRQ== MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 30 Dec 2012 21:07:39 +1100 Subject: Re: Noob trying to parse bad HTML using xml.etree.ElementTree From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356862061 news.xs4all.nl 6935 [2001:888:2000:d::a6]:55658 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35799 On Sun, Dec 30, 2012 at 8:52 PM, Morten Guldager wrote: > Question is if it's possible to tweak xml.etree.ElementTree to accept, and > understand sloppy html, or if you have suggestions for similar easy to use > framework, preferably among the included batteries? > Check out BeautifulSoup, it's fairly good at dealing with messy input. ChrisA