[deviantart] fix video extraction from 'extended_fetch' results

DeviantArt is now serving videos from wixmp servers (1), instead of
the former film00.deviantart.com (2), even though those URLS are still
functional.

They seem to also have re-encoded those videos. The 10 MB 1080p video
from (2) is now only available in 720p at ~20 MB (with a higher
bitrate, but still …). Other videos are still available in 1080p, but
not this one for some reason.

(Changing the '720p' in (1) to '1080p' doesn't work.)

(1) https://wixmp-ed30a86b8c4ca887773594c2.wixmp.com/v/mp4/9feaa2c9-1baf-4fc2-84f7-f3384b34cefe/d5gxnb5-282a2e9a-b552-40ff-8542-b3c5eed823f5.720p.a837d7cec12c41be8ca2ee53152cea3a.mp4
(2) https://film00.deviantart.net/4c1d/v/mp4/2012/279/d/1/_video____brushes_i_use_in_paint_tool_sai_by_chi_u-d5gxnb5.mp4
This commit is contained in:
Mike Fährmann
2020-01-30 17:55:12 +01:00
parent 48be2266ed
commit ec36df4851

View File

@@ -717,7 +717,7 @@ class DeviantartExtractorV2(DeviantartExtractor):
# select largest video
target = max(media["types"],
key=lambda x: text.parse_int(x.get("q", "")[:-1]))
src = target["s"]
src = target["b"]
elif target["t"] == "flash":
src = target["s"]
@@ -811,15 +811,17 @@ class DeviantartDeviationExtractor(DeviantartExtractorV2):
}),
# video
("https://www.deviantart.com/chi-u/art/-VIDEO-Brushes-330774593", {
"url": "3b6e6e761d2d393fa61a4dc3ed6e7db51b14d07b",
"pattern": r"https://wixmp-.+wixmp.com/v/mp4/.+\.720p\.\w+.mp4",
"keyword": {
"filename": r"re:_video____brushes_\w+_by_chi_u-d5gxnb5",
"extension": "mp4",
"target": {
"d": 306,
"f": 9963639,
"q": "1080p",
"f": 19367585,
"h": 720,
"q": "720p",
"t": "video",
"w": 1364,
"src": str,
},
}