RSS-Bridge / rss-bridge

The RSS feed for websites missing it
https://rss-bridge.org/bridge01/
The Unlicense
7.01k stars 1.02k forks source link

Add radius location feature to leboncoin bridge #2080

Open hista opened 3 years ago

hista commented 3 years ago

Because it's complicated to add all the cities, zipcodes to cover an area, it would be nice to add a field to leboncoin bridge: a kilometres radius. Leboncoin website allows this location criterium. For example: https://www.leboncoin.fr/recherche?text=auto&locations=Paris__48.85790600716752_2.358844068809977_10000_20000

Would it be complicated to add to leboncoin bridge?

hista commented 3 years ago

Is it such a terrible idea or just too complicated to implement? :-)

Bockiii commented 2 years ago

Hi,

I just read through the bridge and it seems to me that this will include a considerable (if not impossible) amount of work to pull of.

Reason: The leboncoin api accepts two different ways to define the location, either by setting a "location" as a zip code (or list of zipcodes) OR by setting an "area", defined by longitude, latitude and a radius. These two can not be combined. You can actually see the way leboncoin does it in your link. 48.8....2.3.._10000_20000. 48.8 and 2.3 are lat and long for Paris, the first 10000 I dont know but the second 20000 is the radius in meters.

The current implementation lets you set a location by providing a string of zipcodes. In order to get the radius working, that would need to be changed to defining the area by lat/long/rad. Example: https://openbase.com/js/leboncoin-api

So what you would need to do is to query an online service (like google maps or so) for the long/lat of a given zip code and use that to determine the lat/long. Dealing with these online services always includes registering an application/account with them to get an api key (at least I haven't found one that doesn't), which will make it complicated at best and unusable for most.

So, in order to do this, the user would have to supply the lat/long for the location (and we would need to test if leboncoin expects a certain granularity. Does it need to be 8 digits behind the comma? Maybe 7 or 9?) and then the radius. We could add it as another option to the already 20(!) option fields available but ... I dont know if it's worth the effort.

The bridge was fixed 6 months ago but before that, wasn't touched for 3/6 years. I dont know if the original maintainer would still do it. Calling @JackNUMBER , maybe he will.

JackNUMBER commented 2 years ago

Hello,

I keep blocked with 403 on the leboncoin API, that's why I didn't add any feature to this bridge – and didn't use it anymore.

About the great number of fields for this bridge: I added the ones I needed and stopped when I tried to add every available fields on leboncoin. Currently the UI of RSS-Bridge doesn't allow conditional fields display, it's not a bad things: it keeps it simple.

In this way, add 3 more fields without location picking is a bit painfull to fill (like the min-max fields :/ ) in an other hand, we don't fill the bridge's form very often, once filled in we use the RSS.

Anyway, I can't contribute more on this bridge at the moment 😞

hista commented 2 years ago

Hey, thank you guys for answering my ticket!

I agree with @JackNUMBER, before considering to add new features the priority is to fix leboncoin bridge which is blocked by leboncoin API (403 error). Any idea to solve it? It should be possible because some guys succeed in bypassing datadome: https://www.growthhacking.fr/t/scraping-leboncoin-quest-ce-qui-marche-en-2019-avoir-leur-solution-anti-bot/16934