Bonjour,

J'essaie de récupérer quelque info sur un webserveur.
En utilisant Beautifulsoup j'arrive à avoir ceci (une parte pour l'exemple)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
if(isNaN(sum))sum=0;
writeTD(modus==0?runden(sum/1000,2):runden(sum/1000,2),"33%","right",sds_gelb);
writeTD("kWh","19%","right",sds_gelb);
writeTD(" ","3%");
writeTABLE_END();
document.write("<\/td><\/tr><tr><td>")
</script></td><td><table border="0" cellpadding="0" cellspacing="0" height="" width="100%"><tbody><tr><td width="5%"> </td><td align="" bgcolor="#FFFF00" width="40%">Product.</td><td align="right" bgcolor="#FFFF00" width="33%">13,86</td><td align="right" bgcolor="#FFFF00" width="19%">kWh</td><td width="3%"> </td></tr></tbody></table></td></tr><tr><td>
<table border="0" cellpadding="0" cellspacing="0" height="15" width="100%">
<tbody>
<tr>
<td width="5%">
</td>
<td width="40%">
en utilisant le code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
print (soup.find('td'))
j'obtiens
Code : Sélectionner tout - Visualiser dans une fenêtre à part
<td align="center" alt="" style="border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px;border-right-style:solid;border-right-width:1px; cursor: pointer; width: 43px; background-color:transparent;" valign="top">Product.<img alt="" name="Flag0" onclick="CheckFlag(0)" onmouseover="this.T_WIDTH=200;this.T_OPACITY=80;this.T_TEXTALIGN='center';return escape('&lt;b&gt;Courbe de rendement&lt;/b&gt;')" "/></td>
J'essaie d'avoir le nombre 13,86.
J'ai essaie pas mal de chose mais je n'arrive pas.
Merci pour votre aide