View Single Post
Old 03-06-2011, 02:24 AM   #2
somedayson
Member
somedayson began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Sep 2010
Device: K3
This trick from a sticky in another forum did the trick.

Thanks Kiklop74!



Quote:
Originally Posted by kiklop74 View Post
Small piece of code to convert all links to text:

Spoiler:
Code:
    def preprocess_html(self, soup):
        for alink in soup.findAll('a'):
            if alink.string is not None:
               tstr = alink.string
               alink.replaceWith(tstr)
        return soup
somedayson is offline   Reply With Quote