Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.1 KB

File metadata and controls

42 lines (27 loc) · 1.1 KB

Selenium Python Deployment Heroku

Deploying Python Selenium based project live into Heroku.

Article based on YouTube video:

English : https://youtu.be/kHByjOJh7O0

Malayalam : https://youtu.be/7glbuNJN_6A

Usage

  • Initial Configuration in the script

chrome_options = webdriver.ChromeOptions()
chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--no-sandbox")
driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"), options=chrome_options)
  • Heroku Configuration

    • Heroku buildpacks

    • Heroku config variables

      • CHROMEDRIVER_PATH = /app/.chromedriver/bin/chromedriver
    • requirements.txt

    • Procfile

      web: python main.py