mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-15 21:32:28 +01:00
Make ffnet/fpcom use BeautifulSoup (not Stone) for nested divs.
This commit is contained in:
parent
aa629c2c39
commit
2a353a74f9
1 changed files with 7 additions and 3 deletions
|
|
@ -199,11 +199,15 @@ class FanFictionNetSiteAdapter(BaseSiteAdapter):
|
|||
## more if hit too fast. This is in
|
||||
## additional to what ever the
|
||||
## slow_down_sleep_time setting is.
|
||||
soup = bs.BeautifulStoneSoup(self._fetchUrl(url),
|
||||
selfClosingTags=('br','hr')) # otherwise soup eats the br/hr tags.
|
||||
soup = bs.BeautifulSoup(self._fetchUrl(url),
|
||||
selfClosingTags=('br','hr')) # otherwise soup eats the br/hr tags.
|
||||
|
||||
## Remove the 'share' button.
|
||||
sharediv = soup.find('div', {'class' : 'a2a_kit a2a_default_style'})
|
||||
sharediv.extract()
|
||||
|
||||
div = soup.find('div', {'id' : 'storytext'})
|
||||
|
||||
|
||||
if None == div:
|
||||
raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue