Received: by 10.224.189.75 with SMTP id dd11mr1034144qab.6.1346243633114; Wed, 29 Aug 2012 05:33:53 -0700 (PDT) X-BeenThere: beautifulsoup@googlegroups.com Received: by 10.229.106.201 with SMTP id y9ls1369233qco.8.gmail; Wed, 29 Aug 2012 05:33:52 -0700 (PDT) Received: by 10.224.180.205 with SMTP id bv13mr1028624qab.8.1346243632148; Wed, 29 Aug 2012 05:33:52 -0700 (PDT) Received: by 10.224.18.193 with SMTP id x1msqaa; Tue, 28 Aug 2012 22:52:57 -0700 (PDT) Received: by 10.52.90.69 with SMTP id bu5mr14391vdb.6.1346219576978; Tue, 28 Aug 2012 22:52:56 -0700 (PDT) Date: Tue, 28 Aug 2012 22:52:56 -0700 (PDT) From: Adam Gray To: beautifulsoup@googlegroups.com Message-Id: Subject: Hyphenated element attributes MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_203_360705.1346219576211" ------=_Part_203_360705.1346219576211 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I know it is possible to select elements with hyphenated names using the .find() command, but what about hyphenated attributes? I'm thinking particularly of the new custom data-* attributes available in html5. The following obviously doesn't work: soup.find('img',data-id='xxx') Is there a recommended way of doing this? ------=_Part_203_360705.1346219576211--