tldev-de / immopushr

Telegram Bot that finds offers on immobilienscout24.de, immowelt.de and ebay-kleinanzeigen.de.
GNU General Public License v3.0
30 stars 1 forks source link

Error when captcha page encountered #5

Open mustafabayar opened 3 years ago

mustafabayar commented 3 years ago

I am running the app without any modification using docker, and I see this log:

[2021-04-24T14:45:00.799581+00:00] ImmoPushr.INFO: new url {"url":"https://www.immobilienscout24.de/Suche/shape/wohnung-mieten?shape=d2h2X0llcW5wQWpLb0V4SGlEeGZBfWRCYF1nfkB8T2F6QHBBZWlCZ0JzYEJ1akBvb0FlV29yQGVVX051TGRQc1BiUHNOakxfT2RIaU50WGleeGdAb2dAZF9Aa2lAbmNAe0RobUFxQnBzQHhGbGBBZnBAdmlCdFt_cUBsWGxc&petsallowedtypes=yes,negotiable&numberofrooms=2.0-&price=-1000.0&livingspace=49.0-&pricetype=calculatedtotalrent&enteredFrom=result_list#/"} []

[2021-04-24T14:45:01.853186+00:00] ImmoPushr.INFO: sleep for 5 seconds [] []

[2021-04-24T14:45:08.000377+00:00] ImmoPushr.INFO: sleep for 6 seconds [] []

[2021-04-24T14:45:14.005793+00:00] ImmoPushr.INFO: identified captcha page! [] []

[2021-04-24T14:45:14.007298+00:00] ImmoPushr.INFO: solve captcha using 2captcha [] []

Fatal error: Uncaught Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":".g-recaptcha"}

(Session info: chrome=90.0.4430.85) in /app/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:117

Stack trace:

#0 /app/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php(371): Facebook\WebDriver\Exception\WebDriverException::throwException('no such element', 'no such element...', Array)

#1 /app/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php(612): Facebook\WebDriver\Remote\HttpCommandExecutor->execute(Object(Facebook\WebDriver\Remote\WebDriverCommand))

#2 /app/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php(233): Facebook\WebDriver\Remote\RemoteWebDriver->execute('findElement', Array)

#3 /app/provider/Immobilienscout24.php(70): Facebook\WebDriver\Remote\RemoteWebDriver->findElement(Object(Facebook\WebDriver\WebDriverBy))

#4 /app/provider/Immobilienscout24.php(30): Provider\Immobilienscout24->solveCaptcha()

#5 /app/cron.php(35): Provider\Immobilienscout24->parseOffers('https://www.imm...')



#6 {main}

thrown in /app/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php on line 117

Fatal error: Uncaught Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["--window-size=1920,1080","--lang=de-DE","--no-sandbox","--start-maximized","--disable-infobars","--disable-gpu","--disable-blink-features=AutomationControlled","--user-agent=Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/88.0.4324.150 Safari\/537.36"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"args":["--window-size=1920,1080","--lang=de-DE","--no-sandbox","--start-maximized","--disable-infobars","--disable-gpu","--disable-blink-features=AutomationControlled","--user-agent=Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/88.0.4324.150 Safari\/537.36"]}}}

Operation timed out after 30001 milliseconds with 0 bytes received in /app/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:332
vermaxik commented 3 years ago

I can observe the same issue a few days :( didn't have time yet to look deeper.

tldev-de commented 3 years ago

Hi everyone,

I can confirm this issue. Will create a patch as soon as possible.

mustafabayar commented 3 years ago

I already had developed a hobby flat tracker with golang myself but I wanted to try yours because of Telegram functionality. While waiting for this fix, I decided to add that capability to my own application immo_trakt. And it works like a charm, it is not complete yet, like it only works with in memory stored values to determine if an offer is new or not, maybe later I can add database support. But since I am not doing web scraping, it was much easier. I am also planning to dockerize it later. Anyway, your app was a nice inspiration for me to go on Telegram route. Thanks and good luck :)