remove unused format-strings
This commit is contained in:
@@ -17,6 +17,9 @@ from .. import config
|
|||||||
|
|
||||||
class Extractor():
|
class Extractor():
|
||||||
|
|
||||||
|
directory_fmt = [""]
|
||||||
|
filename_fmt = ""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.session = requests.Session()
|
self.session = requests.Session()
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import re
|
|||||||
class MangaHereMangaExtractor(Extractor):
|
class MangaHereMangaExtractor(Extractor):
|
||||||
"""Extract all manga-chapters from mangahere"""
|
"""Extract all manga-chapters from mangahere"""
|
||||||
category = "mangahere"
|
category = "mangahere"
|
||||||
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}"]
|
|
||||||
filename_fmt = "{manga}_c{chapter:>03}_{page:>03}.{extension}"
|
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?mangahere\.co/manga/([^/]+)/?$"]
|
pattern = [r"(?:https?://)?(?:www\.)?mangahere\.co/manga/([^/]+)/?$"]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import re
|
|||||||
class MangaMintMangaExtractor(Extractor):
|
class MangaMintMangaExtractor(Extractor):
|
||||||
"""Extract all manga-chapters from mangamint"""
|
"""Extract all manga-chapters from mangamint"""
|
||||||
category = "mangamint"
|
category = "mangamint"
|
||||||
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}"]
|
|
||||||
filename_fmt = "{manga}_c{chapter:>03}_{page:>03}.{extension}"
|
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?mangamint\.com(/manga/[^\?]+-manga)"]
|
pattern = [r"(?:https?://)?(?:www\.)?mangamint\.com(/manga/[^\?]+-manga)"]
|
||||||
url_base = "https://www.mangamint.com"
|
url_base = "https://www.mangamint.com"
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ from .. import text
|
|||||||
class MangaShareMangaExtractor(Extractor):
|
class MangaShareMangaExtractor(Extractor):
|
||||||
"""Extract all manga-chapters from mangashare"""
|
"""Extract all manga-chapters from mangashare"""
|
||||||
category = "mangashare"
|
category = "mangashare"
|
||||||
directory_fmt = ["{category}", "{manga}", "c{chapter:>03} - {title}"]
|
|
||||||
filename_fmt = "{manga}_c{chapter:>03}_{page:>03}.{extension}"
|
|
||||||
pattern = [r"(?:https?://)?read\.mangashare\.com/[^/]+$"]
|
pattern = [r"(?:https?://)?read\.mangashare\.com/[^/]+$"]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import time
|
|||||||
|
|
||||||
class PixivUserExtractor(Extractor):
|
class PixivUserExtractor(Extractor):
|
||||||
"""Extract all works of a single pixiv-user"""
|
"""Extract all works of a single pixiv-user"""
|
||||||
|
|
||||||
category = "pixiv"
|
category = "pixiv"
|
||||||
directory_fmt = ["{category}", "{artist-id}-{artist-nick}"]
|
directory_fmt = ["{category}", "{artist-id}-{artist-nick}"]
|
||||||
filename_fmt = "{category}_{artist-id}_{id}{num}.{extension}"
|
filename_fmt = "{category}_{artist-id}_{id}{num}.{extension}"
|
||||||
@@ -133,7 +132,6 @@ class PixivUserExtractor(Extractor):
|
|||||||
|
|
||||||
class PixivWorkExtractor(PixivUserExtractor):
|
class PixivWorkExtractor(PixivUserExtractor):
|
||||||
"""Extract a single pixiv work/illustration"""
|
"""Extract a single pixiv work/illustration"""
|
||||||
|
|
||||||
pattern = [(r"(?:https?://)?(?:www\.)?pixiv\.net/member(?:_illust)?\.php"
|
pattern = [(r"(?:https?://)?(?:www\.)?pixiv\.net/member(?:_illust)?\.php"
|
||||||
r"\?(?:[^&]+&)*illust_id=(\d+)")]
|
r"\?(?:[^&]+&)*illust_id=(\d+)")]
|
||||||
|
|
||||||
@@ -153,7 +151,6 @@ class PixivWorkExtractor(PixivUserExtractor):
|
|||||||
|
|
||||||
class PixivFavoriteExtractor(PixivUserExtractor):
|
class PixivFavoriteExtractor(PixivUserExtractor):
|
||||||
"""Extract all favorites/bookmarks of a single pixiv-user"""
|
"""Extract all favorites/bookmarks of a single pixiv-user"""
|
||||||
|
|
||||||
directory_fmt = ["{category}", "bookmarks", "{artist-id}-{artist-nick}"]
|
directory_fmt = ["{category}", "bookmarks", "{artist-id}-{artist-nick}"]
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php\?id=(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php\?id=(\d+)"]
|
||||||
|
|
||||||
@@ -167,7 +164,6 @@ class PixivFavoriteExtractor(PixivUserExtractor):
|
|||||||
|
|
||||||
class PixivBookmarkExtractor(PixivFavoriteExtractor):
|
class PixivBookmarkExtractor(PixivFavoriteExtractor):
|
||||||
"""Extract all favorites/bookmarks of your own account"""
|
"""Extract all favorites/bookmarks of your own account"""
|
||||||
|
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php()$"]
|
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php()$"]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@@ -194,7 +190,6 @@ class PixivAPI():
|
|||||||
For in-depth information regarding the Pixiv Public-API, see
|
For in-depth information regarding the Pixiv Public-API, see
|
||||||
- http://blog.imaou.com/opensource/2014/10/09/pixiv_api_for_ios_update.html
|
- http://blog.imaou.com/opensource/2014/10/09/pixiv_api_for_ios_update.html
|
||||||
"""
|
"""
|
||||||
|
|
||||||
token_timeout = 50*60 # 50 minutes
|
token_timeout = 50*60 # 50 minutes
|
||||||
|
|
||||||
def __init__(self, session):
|
def __init__(self, session):
|
||||||
|
|||||||
Reference in New Issue
Block a user