[Tutor] An idea for a script
Dick Moores
rdm at rcblue.com
Thu Oct 11 01:47:44 CEST 2007
At 04:20 PM 10/10/2007, Dick Moores wrote:
>How about a hint of how to get those ">jcooley<" things from the
>source? (I'm able to have the script get the source, using urllib2.)
>
>BTW I thought I wouldn't try to use BeautifulSoup right now, but
>take the hard way.
>
>Dick
I asked for a hint too soon. A light went on, and I think I'm on the way with
from urllib2 import *
u = 'http://starship.python.net/crew/index.html'
f = urlopen(u)
a = f.read()
b = a.split('"')
print b
for x in b:
if '<' not in x:
print x
This gets all, but not only, those ">jcooley<" things, I believe.
Now I'll check my email for the hint I asked for..
Dick
More information about the Tutor
mailing list