Second-Hand-Friends / ebayKleinanzeigen

Small Client publish, delete and republish "Kleinanzeigen" on ebayKleinanzeigen.de
Apache License 2.0
93 stars 30 forks source link

extractor for data from filled form "Anzeige aufgeben" #31

Open luxlux opened 3 years ago

luxlux commented 3 years ago

In some cases it's more easy to fill the web page, to create a new offer. especially when creating offers with special fields like for cars or bikes. so i created a javascript script, which can be uses to extract the filled data as "ad" object. the extracted data can be included into your config.json using copy and paste.

It is used like this: Fill in all data in a Chrome browser, after clicking "Anzeige aufgeben", or "Bearbeiten" and open developer tools (right click on "Untersuchen" or press CMD+ALT+I (on Mac)). Select the Tab "console" and copy the full text of this script into it and press RETURN

It should show you the data for copying it.

https://github.com/luxlux/ebayKleinanzeigen/blob/master/extractor.js

While doing this, i noticed, some things, which a not implemented. Unfortunately i never did something in python. May be somebody can add this:

Up to now kleinanzeigen.py script have no handling for filling checkboxes, like used i.e. for offers of cars. This is an example category with such checkboxes:

 "caturl": "https://www.ebay-kleinanzeigen.de/p-kategorie-aendern.html#?path=210/216/alfa_romeo&isParent=false",
  "additional_category_options": { "autos.radio_tuner_b": true, ...}

also a handling for "posterType": "PRIVATE" or "posterType": "COMMERCIAL" is not implemented up to now. Former a filling of the "imprint" field for "COMMERCIAL" should be added.

x86dev commented 3 years ago

Cool thing, I'll play around with this a bit more the next upcoming days!

luxlux commented 3 years ago

Possibly it could also be used to inject it from python via selenium to automatically read out offers (to get manual made changes), before an offer will be deleted and reposted. or to import all offers. or to get an offer by id.

I never used python or selenium, but i guess something like injection of javascript should be part of such a solution. injection will also be used by chrome extensions...