Re: download complete webpage with python

Discussion in 'Python' started by Gabriel Genellina, Dec 8, 2007.

  1. En Fri, 07 Dec 2007 17:58:43 -0300, yi zhang <>
    escribió:

    > The urllib.urlretrieve() can only download the text part of a webpage,
    > not the image associated. How can I download the whole, complete webpage
    > with python? Thanks!


    The images are separate from the html document. You have to parse the html
    text, find the <img> tags, and retrieve them.

    --
    Gabriel Genellina
     
    Gabriel Genellina, Dec 8, 2007
    #1
    1. Advertisements

  2. Gabriel Genellina

    Larry Bates Guest

    Gabriel Genellina wrote:
    > En Fri, 07 Dec 2007 17:58:43 -0300, yi zhang <>
    > escribió:
    >
    >> The urllib.urlretrieve() can only download the text part of a webpage,
    >> not the image associated. How can I download the whole, complete
    >> webpage with python? Thanks!

    >
    > The images are separate from the html document. You have to parse the
    > html text, find the <img> tags, and retrieve them.
    >

    Actually IMHO this is even more difficult than it sounds. Javascript can change
    the webpage after it loads.

    Larry
     
    Larry Bates, Dec 8, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Hayman

    Detected download complete, IIS6 & IE

    Jay Hayman, Feb 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    774
  2. Replies:
    1
    Views:
    709
  3. subscribe
    Replies:
    2
    Views:
    397
    Mark Space
    Apr 28, 2008
  4. Sehboo

    Download complete event

    Sehboo, May 22, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    430
    bruce barker
    May 22, 2008
  5. Paul
    Replies:
    14
    Views:
    1,238
    Alexey Smirnov
    Jun 19, 2008
  6. Prime Mover
    Replies:
    3
    Views:
    420
    Dave Miller
    Mar 8, 2009
  7. sifar
    Replies:
    5
    Views:
    752
  8. soren625
    Replies:
    2
    Views:
    717
    soren625
    Dec 12, 2006
Loading...