nickirk / immo

A bot which monitors immoscout24 and wg-gesucht.de for new flat offers and send requests to offers automatically.
GNU General Public License v3.0
146 stars 44 forks source link

Script doesn't work correctly #1

Closed hopppiii closed 5 years ago

hopppiii commented 5 years ago

Hi,

I tried to start your script as you provided but I get the following issue:

image

Do you know how to fix this issue?

Im using Python 2.7 on Debian

Regards,

hopppiii

nickirk commented 5 years ago

Do you have a href.json or href_old.json file in your current directory? If yes, try to delete them and rerun the script. This could happen also when the internet is not working properly so no information is obtained from the website. Check if the href.json file is empty. I will probably push a fix to this this weekend. Thanks for reporting.

hopppiii commented 5 years ago

The href.jason file was empty. I delted it and rerunned the script but the href.jason file is still empty and I get them same error as before. I am using the script in a V. I guess that shouldn be a problem? I also checked that i have an internet connection. Thank you in advance for fixing!

nickirk commented 5 years ago

Hi, I tested with python3 without modifying anything and the script works. Could you tell me what modifications you have made in the script?

hopppiii commented 5 years ago

Hi,

I guess it works now:

image

I forget to delete the # in front of my URL in the immo.spider.py ...

So when a new expose will appear it automatically write an email, correct? I also get a confirmation Mail from immoscout when the bot writes an email to the landlord, correct?

Do you know if it's possible to run the script on a raspberry pi 3 model b? Im asking because I think that the chromedriver just works on a 64 bit architecture. Does it?

regards,

hopppiii

nickirk commented 5 years ago

Yes, that's how it works in principle if you have set up everything correctly according to the README .

I was able to set it up to work on my Raspberry pi, which is the same model as yours, so it is possible. You just need to install the correct version. Search on Google about how to install chromedriver on your model.

hopppiii commented 5 years ago

Hi,

I saw that the bot wrote an email to a landlord but I didnt received a confirmation mail. Do you know if immoscout blocks the bot? Is it possible to test the bot in this case?

nickirk commented 5 years ago

If you have an account on immoscout with the same email address that you fill into the form as the username, then immoscout will send you an confirmation email. That's what happened to me. I don't know if you registered with the same email address or not.

If you saw the bot sent an email, then it means it is not blocked.

hopppiii commented 5 years ago

Hi,

I currently try to install the bot on my new Raspberry Pi. I just get the following issue with the chromedriver.

I receive the following message when the bot wants to write a new message:

Traceback (most recent call last): File "immo.py", line 58, in <module> submit.submit_app(new) File "/home/pi/immobot/submit.py", line 7, in submit_app driver=webdriver.Chrome('/usr/bin/chromedriver') File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__ desired_capabilities=desired_capabilities) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__ self.start_session(capabilities, browser_profile) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=72.0.3626.121,platform=Linux 4.14.98-v7+ armv7l)

Can you please tell me which chromedriver do you use for your Pi and provide me the link or the command to install?

When I use "sudo apt-get install chromedriver" I get an message that there exist no installationcandidate for this package.

Thank you in advance!

hopppiii commented 5 years ago

Any hints :)?

nickirk commented 5 years ago

Which (new) model of raspberry pi do you have? There are discussion online on how to install chrome driver on raspberry pi? Have you tried any? You need to tell me some details about what you have tried.

On Thu, 16 May 2019, 20:46 hopppiii, notifications@github.com wrote:

Any hints :)?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/nickirk/immo/issues/1?email_source=notifications&email_token=ACGXNBM3U6PXSF6REM2TDODPVWTYRA5CNFSM4G6T3ALKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVSXBUY#issuecomment-493187283, or mute the thread https://github.com/notifications/unsubscribe-auth/ACGXNBJ75ESV3BKTLY3G3N3PVWTYRANCNFSM4G6T3ALA .

hopppiii commented 5 years ago

I buyed the following model "Raspberry Pi 3 Modell B+" and tried several versions of chromium and read a lot of threads regarding installing chromium for pi. Do you use python 2.7 or 3.0? Which model do you use? In case you having the same model and os (noobs for pi) your way of installing chromium should work for me too, right?

nickirk commented 5 years ago

I have the same model as yours. I remember I followed this link: https://www.reddit.com/r/selenium/comments/7341wt/success_how_to_run_selenium_chrome_webdriver_on/ One thing I did not point out in README is that one might need to install selenium, too, if it is not preinstalled. See the link above.

Good luck and let me know if it works.