replace standard library 're' uses with 'util.re()'
This commit is contained in:
@@ -73,7 +73,7 @@ __tests__ = (
|
||||
"views" : int,
|
||||
"favorites" : int,
|
||||
"comments" : int,
|
||||
"_mtime" : "Sat, 16 Feb 2019 19:30:34 GMT",
|
||||
"_http_lastmodified": "Sat, 16 Feb 2019 19:30:34 GMT",
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -10,7 +10,6 @@ from gallery_dl import exception
|
||||
__tests__ = (
|
||||
{
|
||||
"#url" : "https://bato.to/title/86408-i-shall-master-this-family-official/1681030-ch_8",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
"#count" : 66,
|
||||
|
||||
@@ -33,7 +32,6 @@ __tests__ = (
|
||||
{
|
||||
"#url" : "https://bato.to/title/104929-86-eighty-six-official/1943513-vol_1-ch_5",
|
||||
"#comment" : "volume (vol) in url",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
"#count" : 7,
|
||||
|
||||
@@ -46,7 +44,6 @@ __tests__ = (
|
||||
{
|
||||
"#url" : "https://mto.to/chapter/2584460",
|
||||
"#comment" : "'-' in manga title (#5200)",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
|
||||
"chapter" : 9,
|
||||
@@ -64,7 +61,6 @@ __tests__ = (
|
||||
{
|
||||
"#url" : "https://bato.to/title/90710-new-suitor-for-the-abandoned-wife/2089747-ch_76",
|
||||
"#comment" : "duplicate info in chapter_minor / title (#5988)",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
|
||||
"chapter" : 76,
|
||||
@@ -76,7 +72,6 @@ __tests__ = (
|
||||
|
||||
{
|
||||
"#url" : "https://bato.to/title/115494-today-with-you/2631897-ch_38",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
|
||||
"chapter" : 37,
|
||||
@@ -94,20 +89,17 @@ __tests__ = (
|
||||
|
||||
{
|
||||
"#url" : "https://bato.to/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://bato.to/chapter/1681030",
|
||||
"#comment" : "v2 URL",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://bato.to/title/113742-futsutsuka-na-akujo-de-wa-gozaimasu-ga-suuguu-chouso-torikae-den-official",
|
||||
"#category": ("", "batoto", "manga"),
|
||||
"#class" : batoto.BatotoMangaExtractor,
|
||||
"#options" : {"domain": "xbato.org"},
|
||||
"#count" : ">= 21",
|
||||
@@ -122,7 +114,6 @@ __tests__ = (
|
||||
{
|
||||
"#url" : "https://bato.to/title/104929-86-eighty-six-official",
|
||||
"#comment" : "Manga with number in name",
|
||||
"#category": ("", "batoto", "manga"),
|
||||
"#class" : batoto.BatotoMangaExtractor,
|
||||
"#count" : ">= 18",
|
||||
|
||||
@@ -132,7 +123,6 @@ __tests__ = (
|
||||
{
|
||||
"#url" : "https://bato.to/title/140046-the-grand-duke-s-fox-princess-mgchan",
|
||||
"#comment" : "Non-English translation (Indonesian)",
|
||||
"#category": ("", "batoto", "manga"),
|
||||
"#class" : batoto.BatotoMangaExtractor,
|
||||
"#count" : ">= 29",
|
||||
|
||||
@@ -142,149 +132,130 @@ __tests__ = (
|
||||
{
|
||||
"#url" : "https://bato.to/title/134270-removed",
|
||||
"#comment" : "Deleted/removed manga",
|
||||
"#category": ("", "batoto", "manga"),
|
||||
"#class" : batoto.BatotoMangaExtractor,
|
||||
"#exception": exception.StopExtraction,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://bato.to/title/86408-i-shall-master-this-family-official",
|
||||
"#category": ("", "batoto", "manga"),
|
||||
"#class" : batoto.BatotoMangaExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://bato.to/series/86408/i-shall-master-this-family-official",
|
||||
"#comment" : "v2 URL",
|
||||
"#category": ("", "batoto", "manga"),
|
||||
"#class" : batoto.BatotoMangaExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://dto.to/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://fto.to/title/86408/1681030",
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://hto.to/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://jto.to/title/86408/1681030",
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://mto.to/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://wto.to/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://mangatoto.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://mangatoto.net/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://mangatoto.org/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://batocomic.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://batocomic.net/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://batocomic.org/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://readtoto.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://readtoto.net/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://readtoto.org/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://xbato.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://xbato.net/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://xbato.org/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://zbato.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://zbato.net/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://zbato.org/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://comiko.net/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://comiko.org/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://batotoo.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://batotwo.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
{
|
||||
"#url" : "https://battwo.com/title/86408/1681030",
|
||||
"#category": ("", "batoto", "chapter"),
|
||||
"#class" : batoto.BatotoChapterExtractor,
|
||||
},
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ __tests__ = (
|
||||
"extension" : "avif",
|
||||
"filename" : str,
|
||||
"gallery_id": 1615823,
|
||||
"group" : [],
|
||||
"group" : ["mofumofuen"],
|
||||
"lang" : "ja",
|
||||
"language" : "Japanese",
|
||||
"num" : range(1, 22),
|
||||
|
||||
@@ -116,7 +116,7 @@ __tests__ = (
|
||||
"#url" : "https://www.mangaread.org/manga/doesnotexist",
|
||||
"#category": ("", "mangaread", "manga"),
|
||||
"#class" : mangaread.MangareadMangaExtractor,
|
||||
"#exception": exception.HttpError,
|
||||
"#exception": exception.NotFoundError,
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
@@ -20,9 +20,9 @@ __tests__ = (
|
||||
"#category": ("booru", "realbooru", "pool"),
|
||||
"#class" : realbooru.RealbooruPoolExtractor,
|
||||
"#urls" : (
|
||||
"https://realbooru.com//images/bf/d6/bfd682f338691e5254de796040fcba21.mp4",
|
||||
"https://realbooru.com//images/cb/7d/cb7d921673ba99f688031ac554777695.mp4",
|
||||
"https://realbooru.com//images/9e/14/9e140edc1cb2e4cc734ba5bdc4870955.mp4",
|
||||
"https://video-cdn.realbooru.com//images/bf/d6/bfd682f338691e5254de796040fcba21.mp4",
|
||||
"https://video-cdn.realbooru.com//images/cb/7d/cb7d921673ba99f688031ac554777695.mp4",
|
||||
"https://video-cdn.realbooru.com//images/9e/14/9e140edc1cb2e4cc734ba5bdc4870955.mp4",
|
||||
),
|
||||
},
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ __tests__ = (
|
||||
"#url" : "https://sankaku.app/?tags=bonocho",
|
||||
"#category": ("booru", "sankaku", "tag"),
|
||||
"#class" : sankaku.SankakuTagExtractor,
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/data/[^/]{2}/[^/]{2}/[0-9a-f]{32}\.\w+\?e=\d+&(expires=\d+&)?m=[^&#]+",
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/o/[^/]{2}/[^/]{2}/[0-9a-f]{32}\.\w+\?e=\d+&(expires=\d+&)?m=[^&#]+",
|
||||
"#count" : 5,
|
||||
},
|
||||
|
||||
@@ -461,7 +461,7 @@ __tests__ = (
|
||||
"#comment" : "legacy post URL",
|
||||
"#category": ("booru", "sankaku", "post"),
|
||||
"#class" : sankaku.SankakuPostExtractor,
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/data/ac/8e/ac8e3b92ea328ce9cf7211e69c905bf9\.jpg\?e=.+",
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/o/ac/8e/ac8e3b92ea328ce9cf7211e69c905bf9\.jpg\?e=.+",
|
||||
|
||||
# "id": 360451,
|
||||
"id": "y0abGlDOr2o",
|
||||
@@ -473,7 +473,7 @@ __tests__ = (
|
||||
"#category": ("booru", "sankaku", "post"),
|
||||
"#class" : sankaku.SankakuPostExtractor,
|
||||
"#auth" : True,
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/data/13/3c/133cda3bfde249c504284493903fb985\.jpg",
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/o/13/3c/133cda3bfde249c504284493903fb985\.jpg",
|
||||
|
||||
"md5": "133cda3bfde249c504284493903fb985",
|
||||
},
|
||||
@@ -506,7 +506,7 @@ __tests__ = (
|
||||
"#comment" : "md5 hexdigest instead of ID (#3952)",
|
||||
"#category": ("booru", "sankaku", "post"),
|
||||
"#class" : sankaku.SankakuPostExtractor,
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/data/f8/ba/f8ba89043078f0e4be2d9c46550b840a\.jpg",
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/o/f8/ba/f8ba89043078f0e4be2d9c46550b840a\.jpg",
|
||||
"#count" : 1,
|
||||
|
||||
# "id" : 33195194,
|
||||
@@ -519,7 +519,7 @@ __tests__ = (
|
||||
"#comment" : "/posts/ instead of /post/show/ (#4688)",
|
||||
"#category": ("booru", "sankaku", "post"),
|
||||
"#class" : sankaku.SankakuPostExtractor,
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/data/f8/ba/f8ba89043078f0e4be2d9c46550b840a\.jpg",
|
||||
"#pattern" : r"https://s\.sankakucomplex\.com/o/f8/ba/f8ba89043078f0e4be2d9c46550b840a\.jpg",
|
||||
"#count" : 1,
|
||||
|
||||
# "id" : 33195194,
|
||||
|
||||
Reference in New Issue
Block a user