Hello,
J'essaye de scraper des données mais je pédale encore un peu.
J'ai un tableau qui ressemble à ça :
<section>
<div id="dataTableSalaries_wrapper" class="dataTables_wrapper no-footer"><div class="dataTables_info" id="dataTableSalaries_info" role="status" aria-live="polite">Lignes 1 to 10 sur un total de 774</div><div class="dataTables_paginate paging_simple_numbers" id="dataTableSalaries_paginate"><a class="paginate_button previous disabled" aria-controls="dataTableSalaries" data-dt-idx="0" tabindex="0" id="dataTableSalaries_previous">Précédent</a><span><a class="paginate_button current" aria-controls="dataTableSalaries" data-dt-idx="1" tabindex="0">1</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="2" tabindex="0">2</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="3" tabindex="0">3</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="4" tabindex="0">4</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="5" tabindex="0">5</a><span>…</span><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="6" tabindex="0">78</a></span><a class="paginate_button next" aria-controls="dataTableSalaries" data-dt-idx="7" tabindex="0" id="dataTableSalaries_next">Suivant</a></div><div id="dataTableSalaries_filter" class="dataTables_filter"><label>Rechercher : <input class="" placeholder="" aria-controls="dataTableSalaries" type="search"></label></div><div id="dataTableSalaries_processing" class="dataTables_processing" style="display: none;">Chargement...</div><table class="table table-striped dataTable no-footer" id="dataTableSalaries" aria-describedby="dataTableSalaries_info" role="grid" style="width: 968px;">
<thead>
<tr role="row"><th class="sorting_desc" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 20px;" aria-sort="descending" aria-label="ID: activate to sort column ascending">ID</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 169px;" aria-label="Email: activate to sort column ascending">Email</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 78px;" aria-label="Nom: activate to sort column ascending">Nom</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 56px;" aria-label="Prénom: activate to sort column ascending">Prénom</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 57px;" aria-label="Validé ?: activate to sort column ascending">Validé ?</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 82px;" aria-label="Département: activate to sort column ascending">Département</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 96px;" aria-label="Date inscription: activate to sort column ascending">Date inscription</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 98px;" aria-label="Dernier login: activate to sort column ascending">Dernier login</th><th class="sorting" tabindex="0" aria-controls="dataTableSalaries" rowspan="1" colspan="1" style="width: 167px;" aria-label="Actions: activate to sort column ascending">Actions</th></tr>
</thead>
<tbody><tr role="row" class="odd"><td class="sorting_1">828</td><td>claude.poggi@gmail.com</td><td>Poggi</td><td>Claude</td><td>En attente</td><td></td><td>01/10/2016 13:26</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/828">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/828/delete">Supprimer</a>
</td></tr><tr role="row" class="even"><td class="sorting_1">827</td><td>vincent.renaud@outlook.com</td><td>Zhang-renaud</td><td>Pengzi</td><td>En attente</td><td></td><td>30/09/2016 17:15</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/827">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/827/delete">Supprimer</a>
</td></tr><tr role="row" class="odd"><td class="sorting_1">826</td><td>alexandre@familletoussaint.fr</td><td>Toussaint</td><td>Alexandre</td><td>En attente</td><td></td><td>30/09/2016 09:16</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/826">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/826/delete">Supprimer</a>
</td></tr><tr role="row" class="even"><td class="sorting_1">825</td><td>sowijo@outlook.fr</td><td></td><td></td><td>En attente</td><td></td><td>29/09/2016 07:44</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/825">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/825/delete">Supprimer</a>
</td></tr><tr role="row" class="odd"><td class="sorting_1">824</td><td>pires.benoit@outlook.fr</td><td>Pires</td><td>Benoit</td><td>En attente</td><td></td><td>28/09/2016 17:50</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/824">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/824/delete">Supprimer</a>
</td></tr><tr role="row" class="even"><td class="sorting_1">823</td><td>dimarcus@mail.ru</td><td>Mikhaylov</td><td>Dmitri</td><td>En attente</td><td></td><td>28/09/2016 14:26</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/823">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/823/delete">Supprimer</a>
</td></tr><tr role="row" class="odd"><td class="sorting_1">822</td><td>rmn.morel@gmail.com</td><td>Morel</td><td>Romain</td><td>En attente</td><td></td><td>28/09/2016 13:48</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/822">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/822/delete">Supprimer</a>
</td></tr><tr role="row" class="even"><td class="sorting_1">821</td><td>paloma.delhaye@gmail.com</td><td>Delhaye</td><td>Paloma</td><td>En attente</td><td></td><td>28/09/2016 13:13</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/821">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/821/delete">Supprimer</a>
</td></tr><tr role="row" class="odd"><td class="sorting_1">820</td><td>albane_carpentier@hotmail.com</td><td>Carpentier</td><td>Albane</td><td>En attente</td><td></td><td>28/09/2016 09:21</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/820">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/820/delete">Supprimer</a>
</td></tr><tr role="row" class="even"><td class="sorting_1">819</td><td>alan.alterio@gmail.com</td><td>Alterio</td><td>Alan</td><td>En attente</td><td></td><td>27/09/2016 18:46</td><td>30/11/-0001 00:00</td><td>
<a class="btn btn-primary btn-sm" href="/admin/user/819">Détails</a>
<a class="btn btn-danger btn-sm" href="/admin/user/819/delete">Supprimer</a>
</td></tr></tbody>
</table><div class="dataTables_length" id="dataTableSalaries_length"><label>Montrer <select name="dataTableSalaries_length" aria-controls="dataTableSalaries" class=""><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> lignes</label></div><div class="dataTables_paginate paging_simple_numbers"><a class="paginate_button previous disabled" aria-controls="dataTableSalaries" data-dt-idx="0" tabindex="0">Précédent</a><span><a class="paginate_button current" aria-controls="dataTableSalaries" data-dt-idx="1" tabindex="0">1</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="2" tabindex="0">2</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="3" tabindex="0">3</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="4" tabindex="0">4</a><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="5" tabindex="0">5</a><span>…</span><a class="paginate_button " aria-controls="dataTableSalaries" data-dt-idx="6" tabindex="0">78</a></span><a class="paginate_button next" aria-controls="dataTableSalaries" data-dt-idx="7" tabindex="0">Suivant</a></div></div>
</section>
Avec Zenno et cet regex (?<=<td>).*?(?=</td>) j'arrive à récupérer tous les champs <td> mais en fait il ne me faut que les 3 premiers de chaque ligne, ensuite les 4 autres je m'enfous.
Ces 3 champs je veux les concaténer du type : email; nom; prénom; dans un fichier.
Et l'incrémentation des pages se fait comment idéalement? Car là je mets affichage 100 résultats, ensuite pour faire un check des pages suivantes et me stopper quand il n'y a plus rien?
Comment je peux faire ça?
Merci du coup de main