mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.04k stars 795 forks source link

Running Webwhatsapp-Wrapper on Ubuntu Server #504

Closed ghost closed 5 years ago

ghost commented 6 years ago

Hello everyone, i am running the following cmd on my Ubuntu Server via Putty: docker run --network selenium -it -e SELENIUM='http://firefox:4444/wd/hub' -v $(pwd):/app webwhatsapi /bin/bash -c "pip install ./;pip list;python sample/remote.py"

After successful build of docker it prints:
Waiting for QR and from here i have no clue how to continue and the program prints after a few minutes: File "sample/remote.py", line 20, in driver.wait_for_login() File "/usr/local/lib/python2.7/site-packages/webwhatsapi/init.py", line 261, in wait_for_login EC.visibility_of_element_located((By.CSS_SELECTOR, self._SELECTORS['mainPage'])) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:

Maybe i am missing GUI on my Ubuntu Server?

brunosoaresds commented 6 years ago

You need to scan the qrcode with your cellphone (like you do to use webwhatsapp). You can access your server using vnc and scan directly from the browser or you can use the get_qr method, create the image using html or other thing and scan in your computer.

lfdelphino commented 6 years ago

@rbnishant has done a pretty good job with Flask, you can host a webserver and get the QR Code on YOUR_IP:5000/screen using this example

I think that there should be an easier sample for people that are starting now and just want a QR code as this one is too complex

dev-bitrix commented 6 years ago

This rep is for education and perosonal using ONLY. If you didn't understand how to start or how to use this rep. Your level is very low to use this rep. First to start:

  1. Learn, how to use and work on ubuntu.
  2. Use python basics.
  3. Discover how python works with selenium, or create user interface tests on python with selenium library.
  4. Discover selenium basics.
  5. And finally, when your level is up and when your reading code in that rep you can understand that. Your welcome to use and discover that rep.

Read exceptions and understand them!

lfdelphino commented 6 years ago

Should one completely know english to be able to speak english? I don't think so, if that was the case you wouldn't be able to be talking here

Let the guy try and learn from his own mistakes, you do not know what he is trying to accomplish and what it could later mean to our community, everyone has a different approach for learning new things and not fully undestanding something shouldn't become a barrier. Luckly on Github and other places there are still people willing to help, nothing is written on stone (actually almost nothing is written even on readme) and it's very important that we share what we know on opensource repos

I congratulate you for the little roadmap but that's not the only way to learn, you don't even have to know what Ubuntu is to use this repo, I see lots of new developers stop learning and seeing coding as something hard due to all of the invented "right" ways that always diverge from text to text

@ItachiL18 let me know if you need help with something else, I'll be happy to help you if I know the answer and if I don't know we can still learn toghether, just don't stop trying

marcelocecin commented 5 years ago

@lfdelphino I prefer to use bottle instead of flask

ghost commented 5 years ago

thanks guys :)