Skip to content

Bulk asynchronous downloader for multiple file hosts

4.0 KB
Raw Blame
DOMAIN = "imglike.com"
TEST_CASES = [
    {
        "url": "https://imglike.com/image/Palm-Desert-Resuscitation-Education-%28YourCPRMD.com%29.L1xHc",
        "results": [
            {
                "url": "https://imglike.com/images/2022/10/20/Palm-Desert-Resuscitation-Education-YourCPRMD.com.png",
                "filename": "Palm-Desert-Resuscitation-Education-YourCPRMD.com.png",
                "referer": "https://imglike.com/image/L1xHc",
                "album_id": None,
                "uploaded_at": 1666261421,
            }
        ],
    },
    {
        "url": "https://imglike.com/album/Kara-Del-Toro-Naked.cG7l",
        "results": [
            {
                "url": "https://imglike.com/images/2022/06/23/Nude-Kara-Del-Tori-6.jpg",
                "filename": "Nude-Kara-Del-Tori-6.jpg",
                "referer": "https://imglike.com/image/LGXgd",
                "download_folder": "re:Kara Del Toro Naked \\(ImgLike\\)",
                "uploaded_at": None,
                "album_id": "cG7l",
            },
            {
                "url": "https://imglike.com/images/2022/06/23/Nude-Kara-Del-Tori-5.jpg",
                "filename": "Nude-Kara-Del-Tori-5.jpg",
                "referer": "https://imglike.com/image/LGxFT",
                "download_folder": "re:Kara Del Toro Naked \\(ImgLike\\)",
                "uploaded_at": None,
                "album_id": "cG7l",
            },
            {
                "url": "https://imglike.com/images/2022/06/23/Nude-Kara-Del-Tori-3.jpg",
                "filename": "Nude-Kara-Del-Tori-3.jpg",
                "referer": "https://imglike.com/image/LGB1z",
                "download_folder": "re:Kara Del Toro Naked \\(ImgLike\\)",
                "uploaded_at": None,
                "album_id": "cG7l",
            },
            {
                "url": "https://imglike.com/images/2022/06/23/Nude-Kara-Del-Tori-4.jpg",
                "filename": "Nude-Kara-Del-Tori-4.jpg",
                "referer": "https://imglike.com/image/LG6lR",
                "download_folder": "re:Kara Del Toro Naked \\(ImgLike\\)",
                "uploaded_at": None,
                "album_id": "cG7l",
            },
            {
                "url": "https://imglike.com/images/2022/06/23/Nude-Kara-Del-Tori-2.jpg",
                "filename": "Nude-Kara-Del-Tori-2.jpg",
                "referer": "https://imglike.com/image/LG4Jg",
                "download_folder": "re:Kara Del Toro Naked \\(ImgLike\\)",
                "uploaded_at": None,
                "album_id": "cG7l",
            },
            {
                "url": "https://imglike.com/images/2022/06/23/Nude-Kara-Del-Tori-1.jpg",
                "filename": "Nude-Kara-Del-Tori-1.jpg",
                "referer": "https://imglike.com/image/LGP7s",
                "download_folder": "re:Kara Del Toro Naked \\(ImgLike\\)",
                "uploaded_at": None,
                "album_id": "cG7l",
            },
        ],
    },
    {
        "url": "https://imglike.com/bonton18/albums",
        "results": [
            {
                "url": "https://imglike.com/images/2022/10/03/01__4_.jpg",
                "filename": "01__4_.jpg",
                "referer": "https://imglike.com/image/L1iUm",
                "album_id": "iNlR",
            }
        ],
    },
    {
        "url": "https://imglike.com/album/D%C3%A9sir%C3%A9e-Nick-Boob-Slip-at-unesco-benefiz-gala%2C-2001.vihF",
        "description": "Fails with aiohttp and works with curl-cffi",
        "results": [
            {
                "url": "https://imglike.com/images/2020/12/03/Desiree-Nick-Boob-Slip-at-unesco-benefiz-gala-2001-1.jpg",
                "filename": "Desiree-Nick-Boob-Slip-at-unesco-benefiz-gala-2001-1.jpg",
                "referer": "https://imglike.com/image/rq5gV",
                "album_id": "vihF",
                "download_folder": "re:Désirée Nick Boob Slip at unesco-benefiz gala, 2001 \\(ImgLike\\)",
                "uploaded_at": None,
            }
        ],
        "count": 10,
    },
]