fix supportedsites.py for modules without docstring

(fixes #1332)
pull/1352/head
Mike Fährmann 4 years ago
parent 7b5ee922b7
commit e39aea42cd
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -39,6 +39,6 @@ jobs:
pip install nose
make test
- name: Generate man pages and bash/zsh completion
- name: Test autogeneration of man pages, bash/zsh completion, etc
run: |
make man completion
make

@ -1,3 +1,11 @@
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Extractors for https://cyberdrop.me/"""
import base64
from .common import Extractor, Message

@ -212,9 +212,12 @@ IGNORE_LIST = (
def domain(cls):
"""Return the web-domain related to an extractor class"""
url = sys.modules[cls.__module__].__doc__.split()[-1]
if url.startswith("http"):
return url
try:
url = sys.modules[cls.__module__].__doc__.split()[-1]
if url.startswith("http"):
return url
except Exception:
pass
if hasattr(cls, "root") and cls.root:
return cls.root + "/"

Loading…
Cancel
Save