Getting a value that follows string.find()

englishkevin110 at gmail.com englishkevin110 at gmail.com
Tue Aug 13 19:03:46 EDT 2013


On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote:
> lookup urlparse for you answer
> 
> 
> 
> On Tue, Aug 13, 2013 at 6:51 PM,  <> wrote:
> 
> > I know the title doesn't make much sense, but I didnt know how to explain my problem.
> 
> >
> 
> > Anywho, I've opened a page's source in URLLIB
> 
> > starturlsource = starturlopen.read()
> 
> > string.find(starturlsource, '<a href="/profile.php?id=')
> 
> > And I used string.find to find a specific area in the page's source.
> 
> > I want to store what comes after ?id= in a variable.
> 
> > Can someone help me with this?
> 
> > --
> 
> > http://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Joel Goldstick
> 
> http://joelgoldstick.com

I dont want to do any kind of HTML parsing.



More information about the Python-list mailing list