Web scraping is extracting data from websites. In this project, you'll be scraping data from Yahoo's Finance section. More specifically, you'll be harvesting the company name and stock price of a very famous social media company. You've been giving them a lot of your data, now it's time to return the favor.
If you haven't already, you will need to install the following packages:
- pip -
easy_install pip - Beautiful Soup -
pip install BeautifulSoup4
- Create a file called
app.py - Create a file called
index.csv - At the very top of
app.pyimport your libraries:
import urllib2
from bs4 import BeautifulSoup