Tag: beautiful soup

Scraping a web site up to the N-th level with Python

Scraping data from a web site has always been a pleasure with Python. If you come from the VBA world, the BeautifulSoup4 is indeed beautiful! I have been scraping a web site with python before, but now as I have

Tagged with: , , , ,

Find all HTML tags in a web page and print them from a sorted dictionary

Finding all HTML tags from a web page and recording these to a dictionary is magically easy task with Python (if you compare it with #VBA), when Beautiful Soup 4 is used. soup.find_all(True) loops through the tags and a simple

Tagged with: , , , ,

Writing to a text file in Python from a variable, ignoring encoding problems

Writing to a file in Python is usually a simple 2-liner, which is easy to be written:

However, problems with the encoding may cause some research needed. Concerning the encoding this is a great article from the creator of

Tagged with: , , ,
Top