[civitai] fix/improve video downloads (#7502)
- add 'quality-videos' option - fix downloading static .webp files instead of video
This commit is contained in:
@@ -86,9 +86,10 @@ __tests__ = (
|
||||
|
||||
"createdAt": "2024-08-31T01:11:47.021Z",
|
||||
"date" : "dt:2024-08-31 01:11:47",
|
||||
"extension": "jpg",
|
||||
"extension": "png",
|
||||
"filename" : "00014-3150861441",
|
||||
"hash" : "ULN0-w?b4nRjxGM{-;t7M_t7NGae~qRjMyt7",
|
||||
"width" : 1152,
|
||||
"height" : 1536,
|
||||
"id" : 26962948,
|
||||
"nsfwLevel": 1,
|
||||
@@ -96,14 +97,12 @@ __tests__ = (
|
||||
"stats" : dict,
|
||||
"url" : "69bf3279-df2c-4ec8-b795-479e9cd3db1b",
|
||||
"uuid" : "69bf3279-df2c-4ec8-b795-479e9cd3db1b",
|
||||
"width" : 1152,
|
||||
"user" : {
|
||||
"username": "bolero537",
|
||||
},
|
||||
"generation": {
|
||||
"canRemix" : True,
|
||||
"external" : None,
|
||||
"generationProcess": "img2img",
|
||||
"resources" : list,
|
||||
"techniques": [],
|
||||
"tools" : [],
|
||||
@@ -136,6 +135,74 @@ __tests__ = (
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://civitai.com/images/44789630",
|
||||
"#comment": "video",
|
||||
"#class" : civitai.CivitaiImageExtractor,
|
||||
"#urls" : "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/6a09ec54-6de4-4af1-b11d-2d0d8a66d651/original=true,transcode=true,quality=100/copy_C6C532CE-EC47-4A52-9138-AEF1D7756F16.Mp4",
|
||||
|
||||
"date" : "dt:2024-12-10 19:19:14",
|
||||
"extension": "mp4",
|
||||
"filename" : "copy_C6C532CE-EC47-4A52-9138-AEF1D7756F16",
|
||||
"hash" : "U9D8%cIU03Rk02?F$$WE0gs,?GSg~B9ut6sl",
|
||||
"width" : 1080,
|
||||
"height" : 1920,
|
||||
"id" : 44789630,
|
||||
"mimeType" : "video/mp4",
|
||||
"nsfwLevel": 2,
|
||||
"postId" : 10151863,
|
||||
"stats" : dict,
|
||||
"type" : "video",
|
||||
"url" : "6a09ec54-6de4-4af1-b11d-2d0d8a66d651",
|
||||
"uuid" : "6a09ec54-6de4-4af1-b11d-2d0d8a66d651",
|
||||
"metadata" : {
|
||||
"audio" : True,
|
||||
"duration": 15.033,
|
||||
"hash" : "U9D8%cIU03Rk02?F$$WE0gs,?GSg~B9ut6sl",
|
||||
"height" : 1920,
|
||||
"size" : 23984479,
|
||||
"width" : 1080,
|
||||
},
|
||||
"user" : {
|
||||
"username": "jboogx_creative",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://civitai.com/images/74353746",
|
||||
"#comment": "video, rated 'R', WebP download (#7502)",
|
||||
"#class": civitai.CivitaiImageExtractor,
|
||||
"#urls" : "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/c7e3744b-8f0d-4124-94c1-75e2af00431d/original=true,transcode=true,quality=100/2025-04-25-23h40m21s_seed665048144_A man appears from off screen and spanks her butto_2.webm",
|
||||
|
||||
"date" : "dt:2025-05-05 12:27:28",
|
||||
"extension": "webm",
|
||||
"filename" : "2025-04-25-23h40m21s_seed665048144_A man appears from off screen and spanks her butto_2",
|
||||
"hash" : "UMCsEoRPivxY~VjuWBoenMWBx]WrxvV?xvbb",
|
||||
"width" : 512,
|
||||
"height" : 752,
|
||||
"id" : 74353746,
|
||||
"mimeType" : "video/webm",
|
||||
"nsfwLevel": 4,
|
||||
"postId" : 16509805,
|
||||
"stats" : dict,
|
||||
"type" : "video",
|
||||
"url" : "c7e3744b-8f0d-4124-94c1-75e2af00431d",
|
||||
"uuid" : "c7e3744b-8f0d-4124-94c1-75e2af00431d",
|
||||
"metadata" : {
|
||||
"audio" : False,
|
||||
"duration": 5.016,
|
||||
"hash" : "UMCsEoRPivxY~VjuWBoenMWBx]WrxvV?xvbb",
|
||||
"height" : 752,
|
||||
"size" : 6011344,
|
||||
"skipScannedAtReassignment": True,
|
||||
"width" : 512,
|
||||
},
|
||||
"user" : {
|
||||
"id" : 4856161,
|
||||
"username": "VlrgRomNS",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://civitai.com/posts/6877551",
|
||||
"#class" : civitai.CivitaiPostExtractor,
|
||||
|
||||
Reference in New Issue
Block a user