txt = bs.find('body').getText('\n')
return Newlines.sub('\n', txt)

def main():
    urls = [
        'http://www.stackoverflow.com/questions/5331266/python-easiest-way-to-scrape-text-from-list-of-urls-using-beautifulsoup'
        ,
        'http://stackoverflow.com/questions/5330248/how-to-rewrite-a-recursive-function-to-use-a-loop-instead'
        ]
txt = [getPageText(url) for url in urls]
if __name__ == '__main__':
    main()
Python — самый простой способ очистить текст из списка URL-адресов с помощью BeautifulSoup