mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
adapter_deviantartcom: Site changes, new chapter text tag. See #1118
This commit is contained in:
parent
075c5cb7c2
commit
cd1db0a462
1 changed files with 13 additions and 5 deletions
|
|
@ -236,13 +236,21 @@ class DeviantArtComSiteAdapter(BaseSiteAdapter):
|
|||
if commentsdiv:
|
||||
commentsdiv.parent.decompose()
|
||||
|
||||
content = soup.select_one('[data-id=rich-content-viewer]')
|
||||
# three different 'content' tags to look for.
|
||||
# This is the current in Oct 2024
|
||||
content = soup.select_one('[data-editor-viewer="1"]')
|
||||
|
||||
if content is None:
|
||||
# older story
|
||||
# older story? I can't find any of this style in Oct2024
|
||||
content = soup.select_one('[data-id="rich-content-viewer"]')
|
||||
|
||||
if content is None:
|
||||
# olderer story, but used by some older (2018) posts
|
||||
content = soup.select_one('.legacy-journal')
|
||||
if content is None:
|
||||
raise exceptions.FailedToDownload(
|
||||
'Could not find story text. Please open a bug with the URL %s' % self.url
|
||||
|
||||
if content is None:
|
||||
raise exceptions.FailedToDownload(
|
||||
'Could not find story text. Please open a bug with the URL %s' % self.url
|
||||
)
|
||||
|
||||
return self.utf8FromSoup(url, content)
|
||||
|
|
|
|||
Loading…
Reference in a new issue