summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/urlshortener.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/urlshortener.py')
-rw-r--r--gallery_dl/extractor/urlshortener.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/gallery_dl/extractor/urlshortener.py b/gallery_dl/extractor/urlshortener.py
index 972b508..f2e6521 100644
--- a/gallery_dl/extractor/urlshortener.py
+++ b/gallery_dl/extractor/urlshortener.py
@@ -35,25 +35,13 @@ class UrlshortenerLinkExtractor(UrlshortenerExtractor):
"""Extractor for general-purpose URL shorteners"""
subcategory = "link"
pattern = BASE_PATTERN + r"/([^/?#]+)"
- test = (
- ("https://bit.ly/3cWIUgq", {
- "count": 1,
- "pattern": "^https://gumroad.com/l/storm_b1",
- }),
- ("https://t.co/bCgBY8Iv5n", {
- "count": 1,
- "pattern": "^https://twitter.com/elonmusk/status/"
- "1421395561324896257/photo/1",
- }),
- ("https://t.co/abcdefghij", {
- "exception": exception.NotFoundError,
- }),
- )
+ example = "https://bit.ly/abcde"
def __init__(self, match):
UrlshortenerExtractor.__init__(self, match)
self.id = match.group(match.lastindex)
+ def _init(self):
try:
self.headers = INSTANCES[self.category]["headers"]
except Exception: