scrape macy’s deals using beautiful soup

Switch to Dreamhost, and we will move your web site. No kidding.

Let me show you a tiny real example on how to use the bs4 (beautiful soup version 4) module of Python. Say we want to collect information about the hot deals from macy’s. The URL is here. Well, you can see all the info in one page and copy-paste, but that’s not our purpose. First you have to get the content of the page using the cute requests module.


import requests

url = 'http://bit.ly/19zWmQT'
r = requests.get(url)
html_content = r.text

Now start cooking the soup:


from bs4 import...

A historical timeline of Codango™

Original Source

#codango #developer #development #coder #coding

We're happy to share this resource that we found. The content displayed on this page is property of it's original author and/or their organization.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*