Second-Hand-Friends / ebayKleinanzeigen

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

Cant create new ads #35

Open jniggemann opened 2 years ago

jniggemann commented 2 years ago

This is probably due to the shipping options that are default. My ads are all "PICKUP", but this is not set (or the code doesn't get there): img


Traceback (most recent call last):
  File "/home/jn/bin/ebayKleinanzeigen/kleinanzeigen.py", line 564, in <module>
    fPosted = post_ad(driver, ad, True)
  File "/home/jn/bin/ebayKleinanzeigen/kleinanzeigen.py", line 317, in post_ad
    shipment_select.select_by_visible_text("Nur Abholung")
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/support/select.py", line 120, in select_by_visible_text
    self._setSelected(opt)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/support/select.py", line 212, in _setSelected
    option.click()
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable: Element is not currently visible and may not be manipulated
  (Session info: chrome=90.0.4430.212)
DreckSoft commented 2 years ago

Yes, pickup does not work anymore. Shipping is OK.

jniggemann commented 2 years ago

Yes, pickup does not work anymore. Shipping is OK.

For me it's the other way round, pickup does work and shipping does not.

zapp42 commented 2 years ago

0007-Make-PICKUP-shipping-type-work-again.txt

Try this.

Airwave1981 commented 2 years ago

0007-Make-PICKUP-shipping-type-work-again.txt

Thanks, but raises:

name 'shipment_select' is not defined

Think adding select_element = driver.find_element_by_css_selector('select[id$=".versand_s"]') shipment_select = Select(select_element)

after if (ad['shipping_type']) == 'SHIPPING':

is fixing this...

kahironimashte commented 2 years ago

How can I apply all those changes? Donwayo seems to be busy in real life for some time now ;-)

DreckSoft commented 2 years ago

I also lost track of all the changes. Is there any version or pull request out there, that completely fixes the issues. Meaning that deleting works, captcha is supported, pickup an shipping works and the update time and ID is properly written into the JSON.

jniggemann commented 2 years ago

I'm using @Airwave1981's fork which works flawlessly for me when shipping = pickup.

DreckSoft commented 2 years ago

Unfortunately @Airwave1981 fork does ignore shipping type = PICKUP and sometimes even crash with SHIPPING.

Traceback (most recent call last): File "/home/admin/Development/ebayKleinanzeigen/./kleinanzeigen.py", line 579, in fPosted = post_ad(driver, ad, True) File "/home/admin/Development/ebayKleinanzeigen/./kleinanzeigen.py", line 438, in post_ad submit_button.click() File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute return self._parent.execute(command, params) File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable (Session info: chrome=96.0.4664.45)

Airwave1981 commented 2 years ago

Unfortunately @Airwave1981 fork does ignore shipping type = PICKUP and sometimes even crash with SHIPPING.

Traceback (most recent call last): File "/home/admin/Development/ebayKleinanzeigen/./kleinanzeigen.py", line 579, in fPosted = post_ad(driver, ad, True) File "/home/admin/Development/ebayKleinanzeigen/./kleinanzeigen.py", line 438, in post_ad submit_button.click() File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute return self._parent.execute(command, params) File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable (Session info: chrome=96.0.4664.45)

Anyone has a fix for that already, I can directly implement? Thx

DreckSoft commented 2 years ago

I don't think so. I tried to research what the exact issue is but I didn't succeed. Strangely the crash with SHIPPING only happens on one ad with me. But PICKUP gets ignores with add ads. The original one always (?) crashes on PICKUP.

kahironimashte commented 2 years ago

I cloned the fork of @Airwave1981 and it works for the most part :-) All offers are set to shipping possible even if they are only for pickup. But it's working again, yay.

Schmuuu commented 2 years ago

Hi guys, I just found and tried this python script and failed to create an Ad for PICKUP. I noticed this issue and that there wasn't a fix yet (at least not mentioned here). Trying to post my ad in any way I already implemented a few fixes; like these:

I came farther, but price type "FIXED" and PICKUP were still not selected and the ad creation failed. I noticed price type is (now) a drop down and wasn't handled as such and for PICKUP the xpath changed.

So I made some code changes and got it working for me.

At least for PICKUP the ad was successfully created. For SHIPPING additional changes may be required (I haven't tested SHIPPING).

Hope it helps: https://github.com/Schmuuu/ebayKleinanzeigen