Ich versuche, eine Website, die mit Tabellen erstellt wurde, zu verschrotten. Hier ein Link zum Beispiel einer Seite: http://www.rc2.vd.ch/registres/hrcintapp-pub/companyReport.action?rcentId=5947621600000055031025&lang=FR&showHeader=falseScrap-Tabelle HTML mit beautifulSoup
Mein Ziel ist es, den Namen und den Nachnamen zu bekommen: Lass Christian (Screenshot unten).
Ich habe schon viele Websites geknipst, aber dieses hier habe ich absolut keine Ahnung, wie es weiter geht. Es gibt nur "Tabellen" ohne ID/Class-Tags und ich kann nicht herausfinden, wo ich anfangen soll.
Hier ist ein exemple des HTML-Codes:
<table border="1" cellpadding="1" cellspacing="0" width="100%">
\t \t \t <tbody><tr bgcolor="#f0eef2">
\t \t \t \t
\t \t \t \t <th colspan="3">Associés, gérants et personnes ayant qualité pour signer</th>
\t \t \t </tr>
\t \t \t <tr bgcolor="#f0eef2">
\t \t \t \t
\t \t \t \t <th>
\t \t \t \t \t <a class="hoverable" onclick="document.forms[0].rcentId.value='5947621600000055031025';document.forms[0].lang.value='FR';document.forms[0].searchLang.value='FR';document.forms[0].order.value='N';document.forms[0].rad.value='N';document.forms[0].goToAdm.value='true';document.forms[0].showHeader.value=false;document.forms[0].submit();event.returnValue=false; return false;">
\t \t \t \t \t \t Nom et Prénoms, Origine, Domicile, Part sociale
\t \t \t \t \t </a>
\t \t \t \t \t
\t \t \t \t </th>
\t \t \t \t <th>
\t \t \t \t \t <a class="hoverable" onclick="document.forms[0].rcentId.value='5947621600000055031025';document.forms[0].lang.value='FR';document.forms[0].searchLang.value='FR';document.forms[0].order.value='F';document.forms[0].rad.value='N';document.forms[0].goToAdm.value='true';document.forms[0].showHeader.value=false;document.forms[0].submit();event.returnValue=false; return false;">
\t \t \t \t \t \t Fonctions
\t \t \t \t \t </a>
\t \t \t \t \t
\t \t \t \t \t \t <img src="/registres/hrcintapp-pub/img/down_r.png" align="bottom" border="0" alt="">
\t \t \t \t \t
\t \t \t \t </th>
\t \t \t \t <th>Mode Signature</th>
\t \t \t </tr>
\t \t \t
\t \t \t \t <tr bgcolor="#ffffff">
\t \t \t \t \t
\t \t \t \t \t
\t \t \t \t \t <td>
\t \t \t \t \t \t <span style="text-decoration: none;">
\t \t \t \t \t \t \t Lass Christian, du Danemark, à Yverdon-les-Bains, avec 200 parts de CHF 100
\t \t \t \t \t \t </span>
\t \t \t \t \t </td>
\t \t \t \t \t <td><span style="text-decoration: none;">associé gérant </span> </td>
\t \t \t \t \t
\t \t \t \t \t
\t \t \t \t \t \t <td><span style="text-decoration: none;">signature individuelle</span> </td> \t \t \t \t \t
\t \t \t \t \t
\t \t \t \t \t
\t \t \t \t </tr>
\t \t \t
\t \t \t
\t \t \t
\t \t \t
\t \t </tbody></table>
Sie wollen nur die einzelne Zeile, die den Namen hat? –
Ja, ich möchte * Lass Christian * bekommen, aber nicht alle Seiten auf der Website sind gleich, manchmal gibt es mehr Tische. Also möchte ich herausfinden, wie man den Namen für jede Art von Seite bekommt. – jjyoh