I learned Python from codecademy and now I'm trying to learn to use it to mine data from a website. I don't have my own Python system set up (only ever used the Codecademy one) and so I need advice on what to download to run my code and how I can import the Beautiful Soup package into it so I can use BS4. I am on a Mac, running OSX 10.9.4. Thanks!
To install python easy_install on OSX:
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
sudo rm distribute_setup.py
sudo easy_install pip
After installing the python easy_install package. you can then run:
easy_install beautifulsoup4
This will allow you to actually include beautifulsoup4 in your python script:
from bs4 import BeautifulSoup
From there, you will have access to the method BeautifulSoup and I'm assuming you can take it From there. Example:
soup=BeautifulSoup(urlContent)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With