[deviantart] unescape \' in JSON data (#6653)
https://github.com/mikf/gallery-dl/issues/6653#issuecomment-2833783238
This commit is contained in:
@@ -868,7 +868,9 @@ x2="45.4107524%" y2="71.4898596%" id="app-root-3">\
|
|||||||
yield self.api.deviation(deviation_uuid)
|
yield self.api.deviation(deviation_uuid)
|
||||||
|
|
||||||
def _unescape_json(self, json):
|
def _unescape_json(self, json):
|
||||||
return json.replace('\\"', '"').replace("\\\\", "\\")
|
return json.replace('\\"', '"') \
|
||||||
|
.replace("\\'", "'") \
|
||||||
|
.replace("\\\\", "\\")
|
||||||
|
|
||||||
|
|
||||||
class DeviantartUserExtractor(DeviantartExtractor):
|
class DeviantartUserExtractor(DeviantartExtractor):
|
||||||
|
|||||||
@@ -942,6 +942,19 @@ __tests__ = (
|
|||||||
"num" : range(1, 4),
|
"num" : range(1, 4),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.deviantart.com/exusiasword/art/Zenith-and-Silpha-combo-1186254616",
|
||||||
|
"#comment" : "JSON escapes in 'additionalMedia' (#6653)",
|
||||||
|
"#category": ("", "deviantart", "deviation"),
|
||||||
|
"#class" : deviantart.DeviantartDeviationExtractor,
|
||||||
|
"#archive" : False,
|
||||||
|
"#pattern" : (
|
||||||
|
r"https://wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/54e06808-f21d-4b8d-bd48-bdea03cf0af5/djm9jx4-23fc1032-ee0d-460b-ac52-fcdf5e871317\.jpg\?token=ey.+",
|
||||||
|
r"https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/54e06808-f21d-4b8d-bd48-bdea03cf0af5/djm9jx4-7710b540-c27c-41f2-ae84-9d050ec170bc\.png\?token=ey.+",
|
||||||
|
r"https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/54e06808-f21d-4b8d-bd48-bdea03cf0af5/djm9jx4-e04525ea-b781-451a-ae70-b66243417868\.png\?token=ey.+",
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://deviantart.com/view/904858796/",
|
"#url" : "https://deviantart.com/view/904858796/",
|
||||||
"#comment" : "/view/ URLs",
|
"#comment" : "/view/ URLs",
|
||||||
|
|||||||
Reference in New Issue
Block a user