<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 12, 2012, at 8:54 PM, <a href="mailto:tutor-request@python.org">tutor-request@python.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Date: Wed, 12 Dec 2012 20:47:58 -0500<br>From: Ed Owens <<a href="mailto:eowens0124@gmx.com">eowens0124@gmx.com</a>><br>To:<span class="Apple-converted-space"> </span><a href="mailto:tutor@python.org">tutor@python.org</a><br>Subject: [Tutor] reading web page with BeautifulSoup<br>Message-ID: <<a href="mailto:50C933CE.5010503@gmx.com">50C933CE.5010503@gmx.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">from urllib2 import urlopen<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">page = urlopen('w1.weather.gov/obhistory/KDCA.html')<br></blockquote></blockquote></blockquote>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>  File<span class="Apple-converted-space"> </span><br>"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",<span class="Apple-converted-space"> </span><br>line 126, in urlopen<br>    return _opener.open(url, data, timeout)<br>  File<span class="Apple-converted-space"> </span><br>"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",<span class="Apple-converted-space"> </span><br>line 386, in open<br>    protocol = req.get_type()<br>  File<span class="Apple-converted-space"> </span><br>"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",<span class="Apple-converted-space"> </span><br>line 248, in get_type<br>    raise ValueError, "unknown url type: %s" % self.__original<br>ValueError: unknown url type:<span class="Apple-converted-space"> </span><a href="http://w1.weather.gov/obhistory/KDCA.html">w1.weather.gov/obhistory/KDCA.html</a><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><br>Can anyone see what I'm doing wrong here? </span></blockquote><br></div><div>Yes, you should pass the full url, including the scheme:</div><div><br></div><div>urlopen('http://w1.weather.gov/obhistory/KDCA.html')</div><div><br></div><div>By the way, your subject line would be better if it had something to do with url, as the problem is completely unrelated to BeautifulSoup :>)</div><div><br></div><div>Take care,</div><div>Don</div></body></html>