[Tutor] Pictures

Joel Goldstick joel.goldstick at gmail.com
Thu Apr 28 14:48:00 CEST 2011


On Wed, Apr 27, 2011 at 11:41 PM, <l.leichtnam at gmail.com> wrote:

> Hello,
>
> I'm still quite new at this but I'm trying to get a list of the pictures
> adress (... .jpg) of a page of a website.
>
> I thought of using the import urllib and import re, trying to fetch the
> website, parse it, and collect the adresses but I don't know how to do it...
>
> Can you help me?
>
> Thanks
> Sent from my BlackBerry® on the MetroPCS Network
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>


What have you tried?

First try to learn how to read a web page.  You are right to look into urlib
and urlib2.

Its only a handful of lines of code to open a web page and retrieve it to
your system.

Once you do that there is a package called beautiful soup that is a good
tool to read through the tags in the page

Let us know how you are doing.
-- 
Joel Goldstick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110428/1bcd2350/attachment.html>


More information about the Tutor mailing list