mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-07 12:02:25 +02:00
fix_relative_text_links: Allow hrefs to name anchors as well as id.
This commit is contained in:
parent
c730aa2f68
commit
97d37fcfc1
1 changed files with 3 additions and 1 deletions
|
|
@ -833,7 +833,9 @@ try to download.</p>
|
|||
## handle identifiers that otherwise appear to be
|
||||
## selectors themselves. #966
|
||||
try:
|
||||
if href[0] == "#" and soup.select_one("[id='%s']"%href[1:]):
|
||||
# logger.debug("Search for internal link anchor href:(%s)"%href)
|
||||
if href[0] == "#" and soup.select_one("[id='%s'], [name='%s']"%(href[1:],href[1:])):
|
||||
# logger.debug("Found internal link anchor href:(%s)"%href)
|
||||
hrefurl = href
|
||||
except Exception as e:
|
||||
logger.debug("Search for internal link anchor failed href:(%s)"%href)
|
||||
|
|
|
|||
Loading…
Reference in a new issue