[deviantart] fix & improve journal/literature extraction (#6254, #6207)

fetch text from HTML __INITIAL_STATE__,
since the API doesn't reliably work and is unusable for sta.sh journals
This commit is contained in:
Mike Fährmann
2024-10-01 14:31:47 +02:00
parent 8f09e4eb02
commit ed859f05ed
2 changed files with 60 additions and 21 deletions

View File

@@ -767,6 +767,16 @@ __tests__ = (
"extension": "swf",
},
{
"#url" : "https://www.deviantart.com/justatest235723/art/video-1103119114",
"#comment" : "video",
"#class" : deviantart.DeviantartDeviationExtractor,
"#pattern" : r"/f/940f2d05-c5eb-4917-8192-7eb6a2d508c6/di8ro5m-e2a5bdf0-daee-4e18-bede-fbfc394d6c65\.mp4\?token=ey",
"filename" : "video_63aebdd4bc0323da460796b9a2ac8522_by_justatest235723-di8ro5m",
"extension": "mp4",
},
{
"#url" : "https://www.deviantart.com/uotapo/art/INANAKI-Memo-590297498",
"#comment" : "sta.sh URLs from description (#302)",
@@ -810,6 +820,21 @@ __tests__ = (
"#sha1_url": "8ca1dc8df53d3707c778d08a604f9ad9ddba7469",
},
{
"#url" : "https://www.deviantart.com/stash/09z3557z648",
"#comment" : "sta.sh journal (#6207)",
"#class" : deviantart.DeviantartStashExtractor,
"#pattern" : """text:<!DOCTYPE html>\n""",
},
{
"#url" : "https://www.deviantart.com/starvinglunatic/art/Against-the-world-chapter-1-50968347",
"#comment" : "literature (#6254)",
"#class" : deviantart.DeviantartDeviationExtractor,
"#pattern" : """text:<!DOCTYPE html>\n""",
},
{
"#url" : "https://www.deviantart.com/neotypical/art/985226590",
"#comment" : "subscription locked (#4567)",