Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[wget] équivalent ?

7 réponses
Avatar
George Abitbol
Bonjour,

je voudrais savoir s'il existe une fonction native =E0 python qui ferait
le m=EAme boulot que wget.

pour info :
$ python -v
Python 2.4.3 (#1, May 18 2006, 07:40:45)
[GCC 3.3.3 (cygwin special)] on cygwin

Merci.

7 réponses

Avatar
George Abitbol
bon bah j'ai trouvé en fait.

George Abitbol wrote:
Bonjour,

je voudrais savoir s'il existe une fonction native à python qui ferait
le même boulot que wget.

pour info :
$ python -v
Python 2.4.3 (#1, May 18 2006, 07:40:45)
[GCC 3.3.3 (cygwin special)] on cygwin

Merci.


Avatar
Encolpe Degoute
George Abitbol wrote:
Bonjour,

je voudrais savoir s'il existe une fonction native à python qui ferait
le même boulot que wget.

pour info :
$ python -v
Python 2.4.3 (#1, May 18 2006, 07:40:45)
[GCC 3.3.3 (cygwin special)] on cygwin


bon bah j'ai trouvé en fait.


Et c'est ?

--
Encolpe DEGOUTE
http://encolpe.degoute.free.fr/
Logiciels libres, hockey sur glace et autres activités cérébrales


Avatar
George Abitbol
Encolpe Degoute wrote:

Et c'est ?


httplib : http://docs.python.org/lib/module-httplib.html

mais finalement c'est pas si bon que ça, vu que je suis derrière un
proxy, ça fonctionne pas.

Est-ce que quelqu'un a une idée de comment faire marcher la lib dans
ce cas ?

Avatar
Jerome
George Abitbol wrote:
Encolpe Degoute wrote:

Et c'est ?


httplib : http://docs.python.org/lib/module-httplib.html

mais finalement c'est pas si bon que ça, vu que je suis derrière un
proxy, ça fonctionne pas.

Est-ce que quelqu'un a une idée de comment faire marcher la lib dans
ce cas ?



Peut-être comme ça

http://fr.wikibooks.org/wiki/Programmation_Python_Le_r%C3%A9seau

Ou avec urllib2 :

proxy_support = urllib2.ProxyHandler({"http" : 'http://proxy.com:8008'})
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)


Avatar
Damien Wyart
* "George Abitbol" in fr.comp.lang.python:
httplib : http://docs.python.org/lib/module-httplib.html

mais finalement c'est pas si bon que ça, vu que je suis derrière un
proxy, ça fonctionne pas. Est-ce que quelqu'un a une idée de comment
faire marcher la lib dans ce cas ?


httplib est une bibliothèque interne utilisée par urllib et urllib2, qui
sont plus comlplètes, et prennent notamment en charge les proxies (via
un paramètre passé aux fonctions principales).

--
DW

Avatar
pbouige
In article <450166d3$0$11939$, Damien Wyart wrote:
* "George Abitbol" in fr.comp.lang.python:
httplib : http://docs.python.org/lib/module-httplib.html


httplib est une bibliothèque interne utilisée par urllib et urllib2, qui
sont plus comlplètes, et prennent notamment en charge les proxies (via
un paramètre passé aux fonctions principales).


Un truc à voir aussi : pycurl

http://pycurl.sourceforge.net/

PycURL is a Python interface to libcurl. PycURL can be used to
fetch objects identified by a URL from a Python program, similar
to the urllib Python module. PycURL is mature, very fast,
and supports a lot of features.
Supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and
LDAP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP
uploading, kerberos, HTTP form based upload, proxies, cookies,
user+password authentication, file transfer resume,
http proxy tunneling and more!


Avatar
Jean-Marc Pouchoulon
Toujours plus haut:
mechanize ou pbp...

In article <450166d3$0$11939$, Damien Wyart wrote:
* "George Abitbol" in fr.comp.lang.python:
httplib : http://docs.python.org/lib/module-httplib.html
httplib est une bibliothèque interne utilisée par urllib et urllib2, qui

sont plus comlplètes, et prennent notamment en charge les proxies (via
un paramètre passé aux fonctions principales).


Un truc à voir aussi : pycurl

http://pycurl.sourceforge.net/

PycURL is a Python interface to libcurl. PycURL can be used to
fetch objects identified by a URL from a Python program, similar
to the urllib Python module. PycURL is mature, very fast,
and supports a lot of features.
Supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and
LDAP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP
uploading, kerberos, HTTP form based upload, proxies, cookies,
user+password authentication, file transfer resume,
http proxy tunneling and more!