<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<span style="" class="">import</span> <span style="" class="">requests</span><br>
<br>
session_id = <span style="" class="">raw</span>_input('Session id:
').<span style="" class="">strip</span>()<span style="" class=""><br>
start</span>_page = <span style="" class="">int</span>(<span
style="" class="">raw</span>_input('Start page: ').<span style=""
class="">strip</span>())<br>
stop_page = <span style="" class="">int</span>(<span style=""
class="">raw</span>_input('Stop page: ').<span style="" class="">strip</span>())<br>
dl_<span style="" class="">url</span> = '<a moz-do-not-send="true"
href="http://www">http://www</a>.<span style="" class="">eni</span>-<a
moz-do-not-send="true" href="http://training.com/client_net/">training.com/client_net/</a><span
style="" class="">get</span>_<span style="" class="">Resource</span>.aspx'<br>
content = open('dump.html','w+')<br>
for i in range(<span style="" class="">start</span>_page,
stop_page):<br>
content.<span style="" class="">write</span>(<span style=""
class="">requests</span>.<span style="" class="">post</span>(dl_<span
style="" class="">url</span>, data={'idsession':session_id, 'idA':
i}).content)<br>
<span style="" class="">print</span> '%s/%s' % (i, stop_page)<br>
<br>
------------------------<br>
<br>
ou encore<br>
<br>
------------------------<br>
<br>
import sys<br>
<span style="" class="">import</span> <span style="" class="">requests</span><br>
<br>
session_id, start_page, stop_page = sys.argv[1:4]<br>
dl_<span style="" class="">url</span> = '<a moz-do-not-send="true"
href="http://www">http://www</a>.<span style="" class="">eni</span>-<a
moz-do-not-send="true" href="http://training.com/client_net/">training.com/client_net/</a><span
style="" class="">get</span>_<span style="" class="">Resource</span>.aspx'<br>
content = open('dump.html','w+')<br>
for page in range(<span style="" class="">start</span>_page,
stop_page):<br>
content.<span style="" class="">write</span>(<span style=""
class="">requests</span>.<span style="" class="">post</span>(dl_<span
style="" class="">url</span>, data={'idsession':session_id, 'idA':
page}).content)<br>
<span style="" class="">print</span> '%s/%s' % (page,
stop_page)<br>
<br>
-- <br>
Nicolas<br>
</body>
</html>