mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-29 10:25:43 +02:00
Remove in-story ad links from adapter_asexstoriescom.
This commit is contained in:
parent
db0d8ae339
commit
b87a076c86
1 changed files with 6 additions and 0 deletions
|
|
@ -159,5 +159,11 @@ class ASexStoriesComAdapter(BaseSiteAdapter):
|
|||
if self.getConfig('strip_text_links'):
|
||||
for anchor in story1('a', {'target': '_blank'}):
|
||||
anchor.replaceWith(anchor.string)
|
||||
## remove ad links in the story text and their following <br>
|
||||
for anchor in story1('a', {'rel': 'nofollow'}):
|
||||
br = anchor.find_next_sibling('br')
|
||||
if br:
|
||||
br.extract()
|
||||
anchor.extract()
|
||||
|
||||
return self.utf8FromSoup(url, story1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue