View Single Post
Old 07-22-2022, 02:28 AM   #2
unkn0wn
Guru
unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.
 
Posts: 630
Karma: 85520
Join Date: May 2021
Device: kindle
Live Mint update

Can we italicize unresolved links to differentiate between it and resolved links

I've tried something like this in postprocess_html.. it didn't work. (changes even resolved links too) Is there another way?
Code:
def postprocess_html(self, soup):
        for unresolved in soup.findAll('a', href=lambda x: x and x.startswith('http')):
            unresolved['id'] = 'unres-d'
extra_css = '#unres-d{font-style:italic;}
I think this should be done after calibre stitches together all those html files it fetched..
Attached Files
File Type: recipe Live Mint.recipe (4.3 KB, 142 views)
unkn0wn is offline   Reply With Quote