(cls, url="", html="")
| 41 | |
| 42 | @classmethod |
| 43 | def get_info(cls, url="", html=""): |
| 44 | url = fixurl(url, unquote=True) |
| 45 | info = {'name': parse_name(url), |
| 46 | 'hash': {}, |
| 47 | 'pattern': {}, |
| 48 | 'size': 0, |
| 49 | 'status': 7 if url else 8, |
| 50 | 'url': replace_patterns(url, cls.URL_REPLACEMENTS)} |
| 51 | |
| 52 | try: |
| 53 | info['pattern'] = re.match(cls.__pattern__, url).groupdict() |
| 54 | |
| 55 | except Exception: |
| 56 | pass |
| 57 | |
| 58 | return info |
| 59 | |
| 60 | def __init__(self, pyfile): |
| 61 | self._init(pyfile.m.core) |
no test coverage detected