urllib to open url with frames?
Craig H. Anderson
CraigHA at attbi.com
Wed Aug 21 00:58:33 EDT 2002
I want to read the playlist from local public radio station.
My first attempt to use urllib got an error:
This page uses frames, but your browser doesn't support them.
Help please. The code and response follow.
import urllib
url = "http://cpr.org/playlist/?%s"
params = urllib.urlencode({'Frames':1})
ff = urllib.urlopen(url % params)
zz = ff.read()
print zz
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>CPR's Classical Music Channel Playlist</title>
</head>
<frameset framespacing="0" border="false" frameborder="0" rows="30,*">
<frame name="banner" scrolling="no" noresize target="contents" src="../HEADER2.HTM" marginwidth="0" marginheight="0">
<frameset cols="140,*">
<frame name="contents" target="main" src="../bar.htm" scrolling="no" marginwidth="0" marginheight="0" noresize style="margin: -1px">
<frame name="main" scrolling="auto" marginwidth="0" marginheight="0" noresize src="http://plclients.classicalradio.org/cgi-bin/cpr2/playlist.cgi">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
More information about the Python-list
mailing list