Yields False if the URL generates a HTTP404NotFound error.
(self, timeout=10)
| 433 | |
| 434 | @property |
| 435 | def exists(self, timeout=10): |
| 436 | """ Yields False if the URL generates a HTTP404NotFound error. |
| 437 | """ |
| 438 | try: self.open(timeout) |
| 439 | except HTTP404NotFound: |
| 440 | return False |
| 441 | except HTTPError, URLTimeoutError: |
| 442 | return True |
| 443 | except URLError: |
| 444 | return False |
| 445 | except: |
| 446 | return True |
| 447 | return True |
| 448 | |
| 449 | @property |
| 450 | def mimetype(self, timeout=10): |