[chevereto] add generic extractors (#4664)
- support jpgfish - support pixl.li / pixl.is (#3179, #4357)
This commit is contained in:
@@ -4,15 +4,15 @@
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import jpgfish
|
||||
from gallery_dl.extractor import chevereto
|
||||
|
||||
|
||||
__tests__ = (
|
||||
{
|
||||
"#url" : "https://jpg1.su/img/funnymeme.LecXGS",
|
||||
"#category": ("", "jpgfish", "image"),
|
||||
"#class" : jpgfish.JpgfishImageExtractor,
|
||||
"#pattern" : r"https://simp3\.jpg\.church/images/funnymeme\.jpg",
|
||||
"#url" : "https://jpg2.su/img/funnymeme.LecXGS",
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
"#urls" : "https://simp3.jpg.church/images/funnymeme.jpg",
|
||||
"#sha1_content": "098e5e9b17ad634358426e0ffd1c93871474d13c",
|
||||
|
||||
"album" : "",
|
||||
@@ -25,125 +25,131 @@ __tests__ = (
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.church/img/auCruA",
|
||||
"#category": ("", "jpgfish", "image"),
|
||||
"#class" : jpgfish.JpgfishImageExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
"#pattern" : r"https://simp2\.jpg\.church/hannahowo_00457\.jpg",
|
||||
|
||||
"album": "401-500",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg1.su/img/funnymeme.LecXGS",
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpeg.pet/img/funnymeme.LecXGS",
|
||||
"#category": ("", "jpgfish", "image"),
|
||||
"#class" : jpgfish.JpgfishImageExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.pet/img/funnymeme.LecXGS",
|
||||
"#category": ("", "jpgfish", "image"),
|
||||
"#class" : jpgfish.JpgfishImageExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.fishing/img/funnymeme.LecXGS",
|
||||
"#category": ("", "jpgfish", "image"),
|
||||
"#class" : jpgfish.JpgfishImageExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.fish/img/funnymeme.LecXGS",
|
||||
"#category": ("", "jpgfish", "image"),
|
||||
"#class" : jpgfish.JpgfishImageExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.church/img/funnymeme.LecXGS",
|
||||
"#category": ("", "jpgfish", "image"),
|
||||
"#class" : jpgfish.JpgfishImageExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg1.su/album/CDilP/?sort=date_desc&page=1",
|
||||
"#category": ("", "jpgfish", "album"),
|
||||
"#class" : jpgfish.JpgfishAlbumExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "album"),
|
||||
"#class" : chevereto.CheveretoAlbumExtractor,
|
||||
"#count" : 2,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.fishing/a/gunggingnsk.N9OOI",
|
||||
"#category": ("", "jpgfish", "album"),
|
||||
"#class" : jpgfish.JpgfishAlbumExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "album"),
|
||||
"#class" : chevereto.CheveretoAlbumExtractor,
|
||||
"#count" : 114,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.fish/a/101-200.aNJ6A/",
|
||||
"#category": ("", "jpgfish", "album"),
|
||||
"#class" : jpgfish.JpgfishAlbumExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "album"),
|
||||
"#class" : chevereto.CheveretoAlbumExtractor,
|
||||
"#count" : 100,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.church/a/hannahowo.aNTdH/sub",
|
||||
"#category": ("", "jpgfish", "album"),
|
||||
"#class" : jpgfish.JpgfishAlbumExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "album"),
|
||||
"#class" : chevereto.CheveretoAlbumExtractor,
|
||||
"#count" : 606,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpeg.pet/album/CDilP/?sort=date_desc&page=1",
|
||||
"#category": ("", "jpgfish", "album"),
|
||||
"#class" : jpgfish.JpgfishAlbumExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "album"),
|
||||
"#class" : chevereto.CheveretoAlbumExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.pet/album/CDilP/?sort=date_desc&page=1",
|
||||
"#category": ("", "jpgfish", "album"),
|
||||
"#class" : jpgfish.JpgfishAlbumExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "album"),
|
||||
"#class" : chevereto.CheveretoAlbumExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg1.su/exearco",
|
||||
"#category": ("", "jpgfish", "user"),
|
||||
"#class" : jpgfish.JpgfishUserExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
"#count" : 3,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.church/exearco/albums",
|
||||
"#category": ("", "jpgfish", "user"),
|
||||
"#class" : jpgfish.JpgfishUserExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
"#count" : 1,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpeg.pet/exearco",
|
||||
"#category": ("", "jpgfish", "user"),
|
||||
"#class" : jpgfish.JpgfishUserExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.pet/exearco",
|
||||
"#category": ("", "jpgfish", "user"),
|
||||
"#class" : jpgfish.JpgfishUserExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.fishing/exearco",
|
||||
"#category": ("", "jpgfish", "user"),
|
||||
"#class" : jpgfish.JpgfishUserExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.fish/exearco",
|
||||
"#category": ("", "jpgfish", "user"),
|
||||
"#class" : jpgfish.JpgfishUserExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.church/exearco",
|
||||
"#category": ("", "jpgfish", "user"),
|
||||
"#class" : jpgfish.JpgfishUserExtractor,
|
||||
"#category": ("chevereto", "jpgfish", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
63
test/results/pixl.py
Normal file
63
test/results/pixl.py
Normal file
@@ -0,0 +1,63 @@
|
||||
# -*- 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.
|
||||
|
||||
from gallery_dl.extractor import chevereto
|
||||
|
||||
|
||||
__tests__ = (
|
||||
{
|
||||
"#url" : "https://pixl.li/image/894x1023-1c8d6dd3b1b0cd4b0d286b229157a7de.z3DwHB",
|
||||
"#category": ("chevereto", "pixl", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
"#urls" : "https://i.pixl.li/894x1023_1c8d6dd3b1b0cd4b0d286b229157a7de.jpg",
|
||||
"#sha1_content": "3279b86d0ac42348c703770c4781ecdc300fc13c",
|
||||
|
||||
"album": "",
|
||||
"extension": "jpg",
|
||||
"filename": "894x1023_1c8d6dd3b1b0cd4b0d286b229157a7de",
|
||||
"id": "z3DwHB",
|
||||
"url": "https://i.pixl.li/894x1023_1c8d6dd3b1b0cd4b0d286b229157a7de.jpg",
|
||||
"user": "matafaka1",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://pixl.is/image/894x1023-1c8d6dd3b1b0cd4b0d286b229157a7de.z3DwHB",
|
||||
"#category": ("chevereto", "pixl", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://pixl.li/album/estelasaubi.D0bJf",
|
||||
"#category": ("chevereto", "pixl", "album"),
|
||||
"#class" : chevereto.CheveretoAlbumExtractor,
|
||||
"#pattern" : chevereto.CheveretoImageExtractor.pattern,
|
||||
"#count" : 173,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://pixl.li/mjstik",
|
||||
"#category": ("chevereto", "pixl", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
"#pattern" : chevereto.CheveretoImageExtractor.pattern,
|
||||
"#range" : "1-20",
|
||||
"#count" : 20,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://pixl.li/mjstik/albums",
|
||||
"#category": ("chevereto", "pixl", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
"#pattern" : chevereto.CheveretoAlbumExtractor.pattern,
|
||||
"#count" : 285,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://pixl.is/renford/albums",
|
||||
"#category": ("chevereto", "pixl", "user"),
|
||||
"#class" : chevereto.CheveretoUserExtractor,
|
||||
},
|
||||
|
||||
)
|
||||
Reference in New Issue
Block a user