(htmlSource, baseURI, encoding)
| 2511 | self.xfn.append({"relationships": xfn_rels, "href": elm.get('href', ''), "name": elm.string}) |
| 2512 | |
| 2513 | def _parseMicroformats(htmlSource, baseURI, encoding): |
| 2514 | if not BeautifulSoup: |
| 2515 | return |
| 2516 | try: |
| 2517 | p = _MicroformatsParser(htmlSource, baseURI, encoding) |
| 2518 | except UnicodeEncodeError: |
| 2519 | # sgmllib throws this exception when performing lookups of tags |
| 2520 | # with non-ASCII characters in them. |
| 2521 | return |
| 2522 | p.vcard = p.findVCards(p.document) |
| 2523 | p.findTags() |
| 2524 | p.findEnclosures() |
| 2525 | p.findXFN() |
| 2526 | return {"tags": p.tags, "enclosures": p.enclosures, "xfn": p.xfn, "vcard": p.vcard} |
| 2527 | |
| 2528 | class _RelativeURIResolver(_BaseHTMLProcessor): |
| 2529 | relative_uris = set([('a', 'href'), |
no test coverage detected
searching dependent graphs…