<html><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:8pt"><div><br></div><div style="font-family: 'lucida console', sans-serif; font-size: 8pt;"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br>>> Da quello che ho letto immagino faccia parte della risposta del<br>>> protocollo html.<br>>> Avrei la necessità di estrarre il jpg da questi dati, se riesco a<br>>> farlo il resto è una cazzata.<br>>> Avreste un consiglio da darmi su come estrarre questo jpg?<br><br>>Usa urllib2.open invece dei socket. Non reimplementare un client html.<br><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57">Grazie del consiglio, spesso in effetti uso i socket anche per un fine didattico... così capisco meglio come funziona :)</div><div style="font-family: times new
 roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57"><br>In ogni caso avevo provato anche con urlib2.open, non funzionava e non capivo il perché... poi ho scoperto che lo scivolone era nell'apertura del file: </div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57">file=open("cam.jpg","w")</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57">al posto di</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57">file=open("cam.jpg","wb")<br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57"><br></div><div
 style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57">La prima versione su windows scrive in formato testo e quindi mi salvava un jpg sotto forma di testo rendendolo irriconoscibile.</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_7_2_17_1359035346420_57">Piergiorgio</div> </div>  </div></body></html>