[{"name":"ParuVendu Annonces d'objets","actif":true,"url":"https:\/\/www.paruvendu.fr\/mondebarras\/","codeLiens":"\/\/WIZ_TITLE ParuVendu.fr\r\n\r\nrecherche=\"table\" \/\/WIZ_VARIABLE #name:Nom de l'objet recherch\u00e9 #text\r\ncodesINSEE = \"75101\"; \/\/WIZ_VARIABLE #name:Codes INSEE des villes s\u00e9par\u00e9s par des virgules #text\r\n\/\/WIZ_COMMENT Vous devez indiquer les codes INSEE des villes de la recherche. Attention il ne s'agit pas des codes postaux. Pour trouver un code INSEE cherchez le sur le site de linternaute.com. Ces codes sont aussi accessibles apr\u00e8s avoir simul\u00e9 une recherche sur ParuVendu, dans la barre d'adresse apr\u00e8s le texte &codeINSEE=\r\n\/\/WIZ_LINK #name:Chercher un code INSEE sur linternaute.com #link:http:\/\/www.linternaute.com\/ville\/\r\nrayon = 5; \/\/WIZ_VARIABLE #name:Rayon en km #number #code:[0,5,15,30,50,100]\r\nnbResultats = 50; \/\/WIZ_VARIABLE #name:Nombre de r\u00e9sultats \u00e0 extraire\r\n\r\n\r\n\/\/WIZ_TITLE The CSV\r\n\/\/WIZ_COMMENT While the script is running, never open the CSV directly. It would become read-only, would be inaccessible, and the script would crash. Instead, make a copy and open there to check. \r\npathDir = ''; \/\/WIZ_VARIABLE #name:Path of the directory where the CSV must be writtend (leave blank to chose your Desktop)\r\nnameCSV = 'my_export'; \/\/WIZ_VARIABLE #name:Name of the CSV file\r\ndeleteCSVstart = true; \/\/WIZ_VARIABLE #name:Remove the CSV on startup if a file already exists\r\n\r\n\r\nif(!pathDir) pathDir=path(\"desktop\")\r\npathCSV=pathDir+nameCSV+\".csv\"\r\n\r\nif(deleteCSVstart) delete(pathCSV)\r\n\r\n\r\nnbPages=ceil(nbResultats\/20)\r\n\r\niResultat=0\r\nfor(iPage=1;iPage<=nbPages;iPage++)\r\n{\r\n\tif(iResultat<nbResultats)\r\n\t{\r\n\t\thtml=getPage(\"https:\/\/www.paruvendu.fr\/mondebarras\/listefo\/default\/default\/?fulltext=\"+urlEncode(recherche)+\"&elargrayon=1&ray=\"+rayon+\"&idtag=&r=&libelle_lo=Fons&codeinsee=\"+codesINSEE+\"%2C&lo=&pa=&ray=\"+rayon+\"&zvy=&zvt=&px0=&px1=&zmd%5B%5D=VENTE&zmd%5B%5D=TROC&zmd%5B%5D=DON&zmd%5B%5D=RECH&codPro=&filtre=&tri=&ck-part=on&ck-pro=on&p=\"+iPage)\r\n\t\tselectAll(\".debarras-annonce\",html,\"outerHTML\").each{ bloc->\r\n\t\t\tphoto=cleanSelect(\".imgblur\", bloc, \"src\")\r\n\t\t\ttitre=standardizeText(stripTags(removeElement(select(\"h3\", bloc),\"cite\")))\r\n\t\t\tlocalisation=cleanSelect(\"h3 cite\", bloc)\r\n\t\t\tprix=cleanSelect(\".debarras-priceannonce\", bloc, null, \"price\")\r\n\t\t\tdescription=cleanSelect(\"p\", bloc)\r\n\t\t\tlien=cleanSelect(\"a.globann\", bloc,\"href\")\r\n\t\r\n\t\t\tcsv(pathCSV,[\r\n\t\t\t\t\"Titre de l'annonce\":titre,\r\n\t\t\t\t\"Localisation\":localisation,\r\n\t\t\t\t\"Prix\":prix,\r\n\t\t\t\t\"Descriptif\":description,\r\n\t\t\t\t\"Photo\":photo,\r\n\t\t\t\t\"Lien de l'annonce\":lien,\r\n\t\t\t])\r\n\t\t}\r\n\t}\r\n\tiResultat++\r\n}\r\n\r\n\r\n\r\n\/\/MATRICULE 1DXD\r\n","codeGroovy":"","codeFinal":"","regexUrlBloquer":"([^a-z0-9]logout)","nbTaches":"1","modeSuiviCookie":"0","urlsAutoSavProgression":"0","maxUrl":"100000","httpAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko\/20100101 Firefox\/87.0","delai":"100","profondeur":"7"}]