bonjour

je voudrais isoler des liens web dans une page web j'ai déjà testé la méthode suivante mais ça ne me donne pas le résultat que je voudrais je veux récuperer les fichiers en extension *.OCR avec leurs liens de téléchargement


$url = 'https://portail.dgfip.finances.gouv.fr/cft/cft/index.php?p=reception'
$page = Invoke-WebRequest -Uri $url
$page.Links
voici la source



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>DGFIP - SYNCHRONY GATEWAY</title>
<link href="css/general.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" media="print" href="css/impression.css" />
<script language="JavaScript" type="text/javascript" src="js/commun.js"></script>
<style type="text/css">@import url(css/calendrier.css);</style>
<script type="text/javascript" src="js/calendar.js"></script>
<script type="text/javascript" src="js/calendar-fr.js"></script>
<script type="text/javascript" src="js/calendar-setup.js"></script>
<script type="text/javascript">

function selected(cal, date) {
cal.sel.value = date;
if (cal.dateClicked)
cal.callCloseHandler();
}

function closeHandler(cal) {
cal.hide();
_dynarch_popupCalendar = null;
}

function showCalendar(id, format, showsTime, showsOtherMonths) {
var el = document.getElementById(id);
if (_dynarch_popupCalendar != null) {
_dynarch_popupCalendar.hide();
} else {
var cal = new Calendar(1, null, selected, closeHandler);
cal.showsOtherMonths = true;
_dynarch_popupCalendar = cal; // remember it in the global var
cal.setRange(2000, 2070); // min/max year allowed.
cal.create();
}
_dynarch_popupCalendar.setDateFormat(format); // set the specified date format
_dynarch_popupCalendar.parseDate(el.value); // try to parse the text in field
_dynarch_popupCalendar.sel = el; // inform it what input field we use

// the reference element that we pass to showAtElement is the button that
// triggers the calendar. In this example we align the calendar bottom-right
// to the button.
_dynarch_popupCalendar.showAtElement(el.nextSibling, "Br"); // show the calendar

return false;
}

var MINUTE = 60 * 1000;
var HOUR = 60 * MINUTE;
var DAY = 24 * HOUR;
var WEEK = 7 * DAY;
function isDisabled(date) {
var today = new Date();
return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
}

function flatSelected(cal, date) {
var el = document.getElementById("preview");
el.innerHTML = date;
}
</script>
</head>
<body>

<table width="95%" height="183" border="0" align="center" cellpadding="0" cellspacing="0" class="entete">
<tr>
<td> <table width="100%" height="183" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="50" align="left" valign="top"><H4> <img src="images/source/compte.gif" width="22" height="22" border="0" align="absmiddle" />&nbsp;&nbsp;<font face="Comic Sans MS" color="#00C7DB" size="+1">L0350451</font></H4></td>
</tr>
<tr>
<td align="left" valign="top"><table width="200" border="0" cellpadding="3" cellspacing="3" bgcolor="#FFFAE4">
<tr>
<th align="center" bgcolor="#FBE2B2" onmouseover="this.style.background='#FEF1CA'" onmouseout="this.style.background='#FBE2B2'"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><img src="images/source/fleche.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td align="center"><a href="index.php?p=accueil" class="menu">Accueil</a></td>
</tr>
</table></th>
</tr>
<tr>
<th align="center" bgcolor="#FBE2B2" onmouseover="this.style.background='#FEF1CA'" onmouseout="this.style.background='#FBE2B2'"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><img src="images/source/fleche.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td align="center"><a href="index.php?p=emission" class="menu">Emission de fichiers</a></td>
</tr>
</table></th>
</tr>
<tr bgcolor="#FDCD73">
<td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><img src="images/source/fleche.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td align="center"><a href="index.php?p=reception" class="menu">R&eacute;ception de fichiers</a></td>
</tr>
</table></td>
</tr>
<tr>
<th align="center" bgcolor="#FBE2B2" onmouseover="this.style.background='#FEF1CA'" onmouseout="this.style.background='#FBE2B2'"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"><img src="images/source/fleche.gif" width="16" height="16" border="0" align="absmiddle" /></td>
<td align="center"><a href="index.php?p=visualisation" class="menu">Historique des fichiers</a></td>
</tr>
</table></th>
</tr>
</table></td>
</tr>
</table>
</td>
<td width="385" align="right" valign="top"><img src="images/gw-finances-publiques.jpg" width="336" height="183" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right" valign="top">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right" valign="top">&nbsp;</td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="0" class="contenupage">
<tr>
<td class="contenupage"><h3>
<CENTER>
<IMG height=16 alt="" src="images/source/coing-titre.gif" width=16 border=0 class="cacheralimpression" /> &nbsp;Direction Générale des Finances Publiques&nbsp;-&nbsp;GW24: ESPACE DE TELECHARGEMENT DES FICHIERS <IMG height=16 alt="" src="images/source/coind-titre.gif" width=16 border=0 class="cacheralimpression" />
</CENTER>
</h3>
<span class="criteresSelection">
<form id="selection" name="selection" method="get" action="index.php">
<table width="400" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#666666">
<tr>
<th colspan="2" align="center"><strong>
<input name="p" type="hidden" value="reception" />
Crit&egrave;res de s&eacute;lection</strong> </th>
</tr>
<tr>
<th width="150" align="right" valign="middle" bgcolor="#FFFFFF">Date&nbsp; </th>
<td align="left" valign="middle" bgcolor="#FFFFFF"><input name="date" type="text" id="date" style="width:177px;" value="01/10/21"/><a href="javascript:;"><img src="images/source/calendrier.png" alt="Date" title="Choisir une date" width="16" height="16" hspace="6" border="0" align="absmiddle" onclick="return showCalendar('date', '%d/%m/%Y');"/></a></td>
</tr>
<tr>
<td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><em><img src="images/source/visu.gif" width="16" height="16" align="absmiddle" /> Laissez le champ date vide pour voir tous les fichiers disponibles </em></td>
</tr>
<tr>
<th colspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><label> <a href="javascript:document.forms['selection'].submit();"><img src="images/source/rechercher.png" name="imgRechercher" width="138" height="23" border="0" id="imgRechercher" onmouseover="MM_swapImage('imgRechercher','','images/source/rechercher2.png',0)" onmouseout="MM_swapImgRestore()" /></a>&nbsp;
<input type="submit" name="Submit" value="Envoyer" style="display:none;"/>
</label></th>
</tr>
</table>
</form>
<p>&nbsp;</p></span>
<table width="95%" border="0" cellpadding="2" cellspacing="1" bgcolor="#999999" class="listeFichiers">
<thead>
<tr>
<th width="30%" align="center" valign="middle"><em><strong>Nom</strong></em>
</td>
<th width="12%" align="center" valign="middle"><em><strong>Etat</strong></em></th>
<th width="9%" align="center" valign="middle"><em><strong>Taille</strong></em></th>
<th align="center" valign="middle"><em><strong>Date du transfert <a href="index.php?p=reception&t=d&s=a&date=01/10/21&sens=&partenaire=&etat=&pc=0"><img src="images/source/fbas.gif" width="16" height="16" border="0" align="absmiddle" class="cacheralimpression" /></a><a href="index.php?p=reception&t=d&s=d&date=01/10/21&sens=&partenaire=&etat=&pc=0"><img src="images/source/fhaut.gif" width="16" height="16" border="0" align="absmiddle" class="cacheralimpression" /></a></strong></em></th>
</tr>
</thead>
<tbody>

<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/P503-04200-035031-20210930223139.OCR?user=xxxxxx&password=xxxxxxxxx">P503-04200-035031-20210930223139.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">1460</td>
<td align="center">01/10/21 06:31:08</td>
</tr>
<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/P503-04216-035031-20210930223139.OCR?user=xxxxxx&password=xxxxxxxxx">P503-04216-035031-20210930223139.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">584</td>
<td align="center">01/10/21 06:31:07</td>
</tr>
<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/TM-04202-035031-20210930223139.OCR?user=xxxxxx&password=xxxxxxxxx">TM-04202-035031-20210930223139.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">876</td>
<td align="center">01/10/21 06:31:06</td>
</tr>
<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/TM-04204-035031-20210930223140.OCR?user=user=xxxxxx&password=xxxxxxxxx">TM-04204-035031-20210930223140.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">1752</td>
<td align="center">01/10/21 06:31:06</td>
</tr>
<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/P503-04215-035031-20210930223140.OCR?user=xxxxxx&password=xxxxxxxxx">P503-04215-035031-20210930223140.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">292</td>
<td align="center">01/10/21 06:31:05</td>
</tr>
<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/P503-04218-035031-20210930223140.OCR?user=xxxxxx&password=xxxxxxxxx">P503-04218-035031-20210930223140.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">584</td>
<td align="center">01/10/21 06:31:05</td>
</tr>
<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/TM-04200-035031-20210930223142.OCR?user=user=xxxxxx&password=xxxxxxxxx">TM-04200-035031-20210930223142.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">82344</td>
<td align="center">01/10/21 06:31:02</td>
</tr>
<tr style="background-color:#FFFFFF;" onmouseover="this.style.background='#EEEEEE';" onmouseout="this.style.background='#FFFFFF';">
<td align="left"><img src="images/source/recup.png" width="16" height="16" border="0" align="absmiddle" />&nbsp;<a onClick="alert('Faire un clic droit, puis enregistrer la cible sous...');return false" HREF="reception/TM-04218-035031-20210930223142.OCR?user=xxxxxx&password=xxxxxxxxx">TM-04218-035031-20210930223142.OCR</a></td>
<td align="center">Disponible</td>
<td align="center">4964</td>
<td align="center">01/10/21 06:31:01</td>
</tr>
<tr>
<th colspan="6" align="right"><strong>Total : </strong></th>
<td bgcolor="#FFFFFF">8</td>
</tr>
</tbody>
</table>
<p align="right" class="basdepage"> <img src="images/source/haut-page.gif" width="16" height="16" align="absmiddle" />&nbsp;<A href="#">Haut de page</a>&nbsp;&nbsp;&nbsp; <img src="images/source/imprime.gif" width="21" height="18" align="absmiddle" />&nbsp;<a href="javascript:window.print()">Imprimer la page </a>
&nbsp;&nbsp;&nbsp;
<img src="images/source/pdf.gif" width="16" height="16" align="absmiddle" />&nbsp;<a href="index_dl.php?p=receptionpdf&t=&s=&date=01/10/21&sens=&partenaire=&etat=" target="_blank">Ouvrir au format PDF</a> </p>


</p>
</td>
</tr>
</table>
</body></html>