[python-win32] RE Explained With screenshot

James Matthews nytrokiss at gmail.com
Tue Nov 21 03:14:32 CET 2006


The issue has something to do with the way the B wasn't escaped (
don't ask me......) all i did for now is lowered the site sting inline
but thanks guys

On 11/20/06, Tim Roberts <timr at probo.com> wrote:
> James Matthews wrote:
> >> Code:
> >>
> >>
> >>>>> from re import findall
> >>>>> from urllib import basejoin,urlopen
> >>>>> site = urlopen("http://www.goldwatches.com/watches.asp?Brand=11").read()
> >>>>> findall(r'\?Brand=\d+\&pg=\d+',site)
> >>>>>
> >>>>>
> >> Now as you see in the screen shot the interactive interpreter returns
> >> me a list of values however when i run it in regular python i get an
> >> empty list why??
> >>
>
> It works for me inside Pythonwin, in a command line in a .py file, and
> in the command line interactive interpreter.
>
> You should copy "site" to a file so you can look at it and make sure it
> is exactly as you expect.  The "Brand=11" file should be 41,251 bytes.
>
> Also, it is possible you are confusing the debugger by having your
> parameter and your result list both called "site".  Why don't you change
> the parameter to "url" so there is no confusion.
>
> Can you post the entire program?>
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>


-- 
http://www.goldwatches.com


More information about the Python-win32 mailing list