Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 983 Bytes

README.md

File metadata and controls

31 lines (26 loc) · 983 Bytes

Intro to webscraping with python

  1. Make sure Python is installed on your system.
  2. Create folder web-scraping-with-python
  3. Open with favorite text editor
  4. Create main.py file
  5. Create first Hello World program by adding the following code to the file.
    print("Hello World!")
    Run program in terminal
    python main.py    
    
  6. Install Beautiful Soup and requests.
    pip install beautifulsoup4 requests
    

Installing on Mac

In a Python 3 environment on a Mac, you may run into errors when trying to import beautifulsoup4 and requests. Try this in your shell:

# from (my-env) *[main][/usr/local/projects/python/web-scraping-with-python]$
python3 -m venv my-env
source my-env/bin/activate
pip install beautifulsoup4 requests
python3 main.py