# -*- 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 rule34xyz


__tests__ = (
{
    "#url"     : "https://rule34.world/post/1280481",
    "#category": ("booru", "rule34world", "post"),
    "#class"   : rule34xyz.Rule34xyzPostExtractor,
    "#options" : {"tags": True},
    "#results" : "https://rule34.world/posts/1280/1280481/1280481.pic.jpg",

    "created"       : "2026-03-11T21:03:11.567029Z",
    "data"          : {"sources": ["https://x.com/i/status/2031516276615499895"]},
    "date"          : "dt:2026-03-11 21:03:11",
    "extension"     : "jpg",
    "file_url"      : "https://rule34.world/posts/1280/1280481/1280481.pic.jpg",
    "filename"      : "1280481",
    "format"        : "pic",
    "format_id"     : "10",
    "height"        : 1618,
    "id"            : 1280481,
    "likes"         : int,
    "posted"        : "2026-03-11T21:08:34.291657Z",
    "status"        : 2,
    "tags_artist"   : ["cjfurs"],
    "tags_character": ["amy rose"],
    "tags_meta"     : ["5:4"],
    "type"          : 0,
    "uploaderId"    : 2,
    "width"         : 2047,
    "tags"          : [
        "2d",
        "2d (artwork)",
        "2d artwork",
        "5:4",
        "amy rose",
        "ass",
        "ass focus",
        "ass up",
        "bent over",
        "bent over table",
        "big ass",
        "big butt",
        "bubble ass",
        "bubble butt",
        "cjfurs",
        "diadem",
        "eyelashes",
        "green eyes",
        "half-closed eyes",
        "hedgehog girl",
        "locker room",
        "open mouth",
        "round ass",
        "round butt",
        "sega",
        "sonic (series)",
        "sonic the hedgehog (series)",
        "sports bra",
        "sports shorts",
        "spots",
        "sweat",
        "sweatdrop",
        "sweating",
        "sweaty body",
        "tight clothing",
        "underboob",
        "wiggling ass",
        "wiggling butt",
        "wiggling tail",
    ],
    "tags_copyright": [
        "sega",
        "sonic (series)",
        "sonic the hedgehog (series)",
    ],
    "tags_general"  : [
        "2d",
        "2d (artwork)",
        "2d artwork",
        "ass",
        "ass focus",
        "ass up",
        "bent over",
        "bent over table",
        "big ass",
        "big butt",
        "bubble ass",
        "bubble butt",
        "diadem",
        "eyelashes",
        "green eyes",
        "half-closed eyes",
        "hedgehog girl",
        "locker room",
        "open mouth",
        "round ass",
        "round butt",
        "sports bra",
        "sports shorts",
        "spots",
        "sweat",
        "sweatdrop",
        "sweating",
        "sweaty body",
        "tight clothing",
        "underboob",
        "wiggling ass",
        "wiggling butt",
        "wiggling tail",
    ],
},

{
    "#url"     : "https://rule34.world/zenless_zone_zero",
    "#category": ("booru", "rule34world", "tag"),
    "#class"   : rule34xyz.Rule34xyzTagExtractor,
    "#pattern" : r"https://rule34(\.world|storage.b-cdn.net)/posts/\d+/\d+/\d+\.(pic\.jpg|mov.mp4)",
    "#range"   : "1-100",
    "#count"   : 100,

    "created"    : "iso:8601",
    "date"       : "type:datetime",
    "extension"  : {"jpg", "mp4"},
    "file_url"   : str,
    "filename"   : r"re:\d+",
    "format"     : {"pic", "mov"},
    "format_id"  : {"10", "100"},
    "width"      : int,
    "height"     : int,
    "id"         : int,
    "likes"      : int,
    "posted"     : "iso:8601",
    "search_tags": "zenless zone zero",
    "status"     : 2,
    "type"       : {0, 1},
    "uploaderId" : 2,
},

{
    "#url"     : "https://rule34.world/preview_%2528preview0%2529",
    "#category": ("booru", "rule34world", "tag"),
    "#class"   : rule34xyz.Rule34xyzTagExtractor,
    "#range"   : "1-100",
    "#count"   : 16,

    "search_tags": "preview (preview0)",
},

{
    "#url"     : "https://rule34.world/playlists/view/259015",
    "#category": ("booru", "rule34world", "playlist"),
    "#class"   : rule34xyz.Rule34xyzPlaylistExtractor,
    "#count"   : 21,

    "playlist_id": "259015",
},

)
