| 2456 | return sVCards.strip() |
| 2457 | |
| 2458 | def isProbablyDownloadable(self, elm): |
| 2459 | attrsD = elm.attrMap |
| 2460 | if 'href' not in attrsD: |
| 2461 | return 0 |
| 2462 | linktype = attrsD.get('type', '').strip() |
| 2463 | if linktype.startswith('audio/') or \ |
| 2464 | linktype.startswith('video/') or \ |
| 2465 | (linktype.startswith('application/') and not linktype.endswith('xml')): |
| 2466 | return 1 |
| 2467 | path = urlparse.urlparse(attrsD['href'])[2] |
| 2468 | if path.find('.') == -1: |
| 2469 | return 0 |
| 2470 | fileext = path.split('.').pop().lower() |
| 2471 | return fileext in self.known_binary_extensions |
| 2472 | |
| 2473 | def findTags(self): |
| 2474 | all = lambda x: 1 |