Git Product home page Git Product logo

stackoverflow-fanatic-badge's People

Contributors

8of avatar albertopasqualetto avatar alexsomai avatar cdstanford avatar luisgc93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stackoverflow-fanatic-badge's Issues

NoSuchElementException when running script

Thanks for the amazing script! I had to make a couple of tweaks to get it to work so far:

  • Dependency on sendgrid isn't mentioned (sudo pip3 install sendgrid)

  • The google chrome options didn't work ("This version of ChromeDriver only supports Chrome version 81"), but I replaced

    chrome_options = Options()
    chrome_options.binary_location = os.environ.get('GOOGLE_CHROME_SHIM')
    driver = webdriver.Chrome(chrome_options=chrome_options)

with (after installing webdriver_manager)

from webdriver_manager.chrome import ChromeDriverManager

    driver = webdriver.Chrome(ChromeDriverManager().install())

and that worked! This was as suggested here: https://stackoverflow.com/questions/60296873/sessionnotcreatedexception-message-session-not-created-this-version-of-chrome


Anyway, now the script seems to work, opening up Chrome and so on, but then it throws the following error:

Message: 'An error occurred while trying to access stackoverflow.com!'
Arguments: (NoSuchElementException('no such element: Unable to locate element: {"method":"css selector","selector":".mini-avatar"}\n  (Session info: chrome=83.0.4103.61)', None, None),)

Any idea how to fix that?

Stackexchange oauth page hangs on "Authorizing Application" screen

The Medium guides were very helpful. I have almost everything working now and deployed to Heroku. I'm maintaining a fork for the things I've fixed: https://github.com/cdstanford/stackoverflow-fanatic-badge

I'm running into one last issue when trying to use the stack_exchange_api.py script to get an access token. The shell script display is as expected:

2020-06-13 12:07:40,421 root - INFO - Access the following URL to obtain the access token: https://stackexchange.com/oauth/dialog?response_type=code&client_id=*****&redirect_uri=https%3A%2F%2Fstackexchange.com%2Foauth%2Flogin_success&scope=no_expiry&state=*****************************

But when visiting the URL it hangs on an "Authorizing Application" screen, as in the following screenshot:

authorizing-application

Not sure if this is an issue with the code or on StackExchange's side. Any ideas?

I'm getting error on heroku although I provided required env vars

2020-11-11T13:07:40.206127+00:00 app[clock.1]: 2020-11-11 13:07:40,205 - root - INFO - Logging into stackoverflow.com
2020-11-11T13:07:40.206291+00:00 app[clock.1]: 2020-11-11 13:07:40,206 - root - ERROR - Set 'STACK_OVERFLOW_EMAIL' 'STACK_OVERFLOW_PASSWORD' 'STACK_OVERFLOW_DISPLAY_NAME' env variables to successfully log into Stack Overflow
2020-11-11T13:07:40.206493+00:00 app[clock.1]: 2020-11-11 13:07:40,206 - apscheduler.executors.default - INFO - Job "access_stack_overflow_page (trigger: interval[3:00:00], next run at: 2020-11-11 16:07:40 UTC)" executed successfully

Edit README.md

Missing letter P in readme.md

Mandatory (basic login script variables):

  • STACK_OVERFLOW_EMAIL
  • STACK_OVERFLOW_PASSWORD
  • STACK_OVERFLOW_DISLAY_NAME

STACK_OVERFLOW_DISPLAY_NAME

Make some environment variables optional

There are some environment variables that are not mandatory to be set for this script to work. They just add some improvements.

More specific, these are STACK_EXCHANGE_KEY and SENDGRID_API_KEY. If they are not set, just exit silently (maybe logging an INFO message).

ChromeDriverManager().install() --> no such driver by url http://chromedriver.storage.googleapis.com/LATEST_RELEASE_117.0.5938

Is anyone else getting this error? Running on py3.8

>>> from selenium import webdriver
>>> from webdriver_manager.chrome import ChromeDriverManager
>>> driver = webdriver.Chrome(ChromeDriverManager().install())
 
[WDM] - Current google-chrome version is 117.0.5938
[WDM] - Get LATEST driver version for 117.0.5938
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/avaj040/.local/lib/python3.8/site-packages/webdriver_manager/chrome.py", line 31, in install
    driver_path = self._get_driver_path(self.driver)
  File "/home/avaj040/.local/lib/python3.8/site-packages/webdriver_manager/manager.py", line 22, in _get_driver_path
    driver_version = driver.get_version()
  File "/home/avaj040/.local/lib/python3.8/site-packages/webdriver_manager/driver.py", line 40, in get_version
    return self.get_latest_release_version()
  File "/home/avaj040/.local/lib/python3.8/site-packages/webdriver_manager/driver.py", line 64, in get_latest_release_version
    validate_response(resp)
  File "/home/avaj040/.local/lib/python3.8/site-packages/webdriver_manager/utils.py", line 79, in validate_response
    raise ValueError("There is no such driver by url {}".format(resp.url))
ValueError: There is no such driver by url http://chromedriver.storage.googleapis.com/LATEST_RELEASE_117.0.5938

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.