Hi,
I am new to Python, trying to learn it by carrying out specific tasks.  I
want to start with trying to scrap the contents of a web page.  I have
downloaded Python 3.3 and BeautifulSoup 4.

If I call upon urlopen in any form, such as below, I get the error as shown
below the syntax:  Does urlopen not apply to Python 3.3?  If not then
what;s the syntax I should be using?  Thanks so much.

import urllib
from bs4 import BeautifulSoup
soup = BeautifulSoup(urllib.urlopen("http://www.pinterest.com";))

Traceback (most recent call last):
  File "C:\Users\Seema\workspace\example\main.py", line 3, in <module>
    soup = BeautifulSoup(urllib.urlopen("http://www.pinterest.com";))
AttributeError: 'module' object has no attribute 'urlopen'
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to