mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 02:51:48 +02:00
adapter_fictionmaniatv: Updates for site change
This commit is contained in:
parent
44f5feacfb
commit
658b637716
3 changed files with 14 additions and 2 deletions
|
|
@ -2076,7 +2076,9 @@ datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S
|
|||
|
||||
[fictionmania.tv]
|
||||
use_basic_cache:true
|
||||
slow_down_sleep_time:10
|
||||
website_encodings:ISO-8859-1,auto
|
||||
user_agent:
|
||||
|
||||
## Extra metadata that this adapter knows about. See [archiveofourown.org]
|
||||
## for examples of how to use them.
|
||||
|
|
|
|||
|
|
@ -167,11 +167,19 @@ class FictionManiaTVAdapter(BaseSiteAdapter):
|
|||
# <div style="margin-left:10ex;margin-right:10ex">
|
||||
## fetching SWI version now instead of text.
|
||||
htmlurl = url.replace('readtextstory','readhtmlstory')
|
||||
soup = self.make_soup(self.get_request(htmlurl))
|
||||
div = soup.find('div',style="margin-left:10ex;margin-right:10ex")
|
||||
## Used to find by style, but it's inconsistent now. we've seen:
|
||||
## margin-left:10ex;margin-right:10ex
|
||||
## margin-right: 5%; margin-left: 5%
|
||||
## margin-left:5%; margin-right:5%
|
||||
## margin-left:5%; margin-right:5%; background: white
|
||||
## but '<!--Read or display the file-->' appears to be consistent.
|
||||
data = self.get_request(htmlurl)
|
||||
soup = self.make_soup(data[data.index('<!--Read or display the file-->'):])
|
||||
div = soup.find('div')
|
||||
if div:
|
||||
return self.utf8FromSoup(htmlurl,div)
|
||||
else:
|
||||
# logger.debug(soup)
|
||||
logger.debug("Story With Images(SWI) not found, falling back to HTML.")
|
||||
|
||||
## fetching html version now instead of text.
|
||||
|
|
|
|||
|
|
@ -2069,7 +2069,9 @@ datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S
|
|||
|
||||
[fictionmania.tv]
|
||||
use_basic_cache:true
|
||||
slow_down_sleep_time:10
|
||||
website_encodings:ISO-8859-1,auto
|
||||
user_agent:
|
||||
|
||||
## Extra metadata that this adapter knows about. See [archiveofourown.org]
|
||||
## for examples of how to use them.
|
||||
|
|
|
|||
Loading…
Reference in a new issue