Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LeBonCoin failed with error 500 #735

Closed
JackNUMBER opened this issue Jun 29, 2018 · 5 comments
Closed

LeBonCoin failed with error 500 #735

JackNUMBER opened this issue Jun 29, 2018 · 5 comments
Labels
Bridge-Broken Confirmed broken bridge

Comments

@JackNUMBER
Copy link
Contributor

JackNUMBER commented Jun 29, 2018

Leboncoin definitely changed its url anatomy. And the results' DOM structure too.

Error message: Could not request LeBonCoin.
Query string: action=display&bridge=LeBonCoin&k=test&r=ile_de_france%2Foccasions&c=&format=Plaintext

https://www.leboncoin.fr/voitures/offres/alsace/?q=test&f=a&th=1 is now https://www.leboncoin.fr/recherche/?text=test&category=2&region=1

@JackNUMBER
Copy link
Contributor Author

JackNUMBER commented Jun 29, 2018

After a bit of research there is some shade in url use for leboncoin.
https://www.leboncoin.fr/voitures/offres/ and https://www.leboncoin.fr/voitures/offres/alsace/ works but https://www.leboncoin.fr/voitures/offres/alsace/?q=test doens't. Url params still different.

I suggest to use the "/recherche/" anatomy.

@JackNUMBER
Copy link
Contributor Author

JackNUMBER commented Jun 29, 2018

Categories + id:

-- Toutes catégories : ''

### EMPLOI
-- Emploi et recrutement : '71'
-- Offres d'emploi et jobs : '33'

### VEHICULES
-- Tous : '1'
-- Voitures : '2'
-- Motos : '3'
-- Caravaning : '4'
-- Utilitaires : '5'
-- Equipement Auto : '6'
-- Equipement Moto : '44'
-- Equipement Caravaning : '50'
-- Nautisme : '7'
-- Equipement Nautisme : '51'

### IMMOBILIER
-- Tous : '8'
-- Ventes immobilières : '9'
-- Locations : '10'
-- Colocations : '11'
-- Bureaux & Commerces : '13'

### VACANCES
-- Tous : '66'
-- Locations & Gîtes : '12'
-- Chambres d'hôtes : '67'
-- Campings : '68'
-- Hôtels : '69'
-- Hébergements insolites : '70'

### MULTIMEDIA
-- Tous : '14'
-- Informatique : '15'
-- Consoles & Jeux vidéo : '43'
-- Image & Son : '16'
-- Téléphonie : '17'

### LOISIRS
-- Tous : '24'
-- DVD / Films : '25'
-- CD / Musique : '26'
-- Livres : '27'
-- Animaux : '28'
-- Vélos : '55'
-- Sports & Hobbies : '29'
-- Instruments de musique : '30'
-- Collection : '40'
-- Jeux & Jouets : '41'
-- Vins & Gastronomie : '48'

### MATERIEL PROFESSIONNEL
-- Tous : '56'
-- Matériel Agricole : '57'
-- Transport - Manutention : '58'
-- BTP - Chantier Gros-oeuvre : '59'
-- Outillage - Matériaux 2nd-oeuvre : '60'
-- Équipements Industriels : '32'
-- Restauration - Hôtellerie : '61'
-- Fournitures de Bureau : '62'
-- Commerces & Marchés : '63'
-- Matériel Médical : '64'

### SERVICES
-- Tous : '31'
-- Prestations de services : '34'
-- Billetterie : '35'
-- Evénements : '49'
-- Cours particuliers : '36'
-- Covoiturage : '65'

### MAISON
-- Tous : '18'
-- Ameublement : '19'
-- Electroménager : '20'
-- Arts de la table : '45'
-- Décoration : '39'
-- Linge de maison : '46'
-- Bricolage : '21'
-- Jardinage : '52'
-- Vêtements : '22'
-- Chaussures : '53'
-- Accessoires & Bagagerie : '47'
-- Montres & Bijoux : '42'
-- Equipement bébé : '23'
-- Vêtements bébé : '54'

-- AUTRES : '37'

@JackNUMBER
Copy link
Contributor Author

Regions:

Toute la France : ''
Alsace : '1'
Aquitaine : '2'
Auvergne : '3'
Basse Normandie : '4'
Bourgogne : '5'
Bretagne : '6'
Centre : '7'
Champagne Ardenne : '8'
Corse : '9'
Franche Comté : '10'
Haute Normandie : '11'
Ile de France : '12'
Languedoc Roussillon : '13'
Limousin : '14'
Lorraine : '15'
Midi Pyrénées : '16'
Nord Pas De Calais : '17'
Pays de la Loire : '18'
Picardie : '19'
Poitou Charentes : '20'
Provence Alpes Côte d'Azur : '21'
Rhône-Alpes : '22'
Guadeloupe : '23'
Martinique : '24'
Guyane : '25'
Réunion : '26'

@logmanoriginal
Copy link
Member

Thanks for reporting! And for taking the time to figure out all of the data 😮

https://www.leboncoin.fr/voitures/offres/ and
https://www.leboncoin.fr/voitures/offres/alsace/?q=test works but
https://www.leboncoin.fr/voitures/offres/alsace/?q=test doens't. Url params still different.

The second and third URL are the same... Am I missing something? 🤔

https://www.leboncoin.fr/recherche/?text=test&category=2&region=1

Not sure I understand correctly what needs to be done:

  • Replace categories and regions of the bridge with the ones from your list
  • Insert category ID + region ID + query text in the example URL above

https://www.leboncoin.fr/recherche/?text=<query>&category=<category_id>&region=<region_id>

Like that?
You want to give it a try? 😁

@logmanoriginal logmanoriginal added the Bridge-Broken Confirmed broken bridge label Jun 30, 2018
@JackNUMBER
Copy link
Contributor Author

My bad, wrong copy/past. I updated my comment: the working url is https://www.leboncoin.fr/voitures/offres/alsace/, this type of url doesn't support q parameter.

I started working on it 😉
https://github.com/JackNUMBER/rss-bridge/tree/fix-leboncoin-bridge

I think add all the search fields might be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bridge-Broken Confirmed broken bridge
Projects
None yet
Development

No branches or pull requests

2 participants