how to get a page's html code via a proxy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JuHui

    #1

    how to get a page's html code via a proxy

    who can help me?
    please give me a sample code. thanks a lot.

  • Fredrik Lundh

    #2
    Re: how to get a page's html code via a proxy

    "JuHui" wrote:
    [color=blue]
    > who can help me?[/color]

    did you check the documentation ? a quick look in the library index
    might have helped you find this page

    Source code: Lib/urllib/ urllib is a package that collects several modules for working with URLs: urllib.request for opening and reading URLs, urllib.error containing the exceptions raised by urlli...


    (search for "proxy" on that page to learn how urllib handles proxies)
    [color=blue]
    > please give me a sample code.[/color]

    import urllib
    urllib.urlretri eve("someurl", "filename")

    hope this helps!

    </F>



    Comment

    • JuHui

      #3
      Re: how to get a page's html code via a proxy

      thank you! I am not good at it.

      Comment

      Working...