Skip to content

Commit

Permalink
refactor: update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbrig authored Feb 13, 2024
1 parent da8f41a commit a06fbe7
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@
import re
import requests

# chrome_options = Options()

# determine if local or docker
# if os.getenv('DOCKER'):
# chrome_options.add_argument('--no-sandbox')
# chrome_options.add_argument('--headless')
# chrome_options.add_argument('--disable-dev-shm-usage')
# chrome_options.binary_location = '/usr/bin/google-chrome'
# chrome_options.add_argument('--disable-gpu')
# chrome_options.add_argument('--no-sandbox')
# chrome_options.add_argument('--headless')
# chrome_options.add_argument('--disable-dev-shm-usage')
# elif os.getenv('LOCAL') == 'True':
# chrome_options.add_experimental_option("detach", True)

# chrome_service = ChromeService(ChromeDriverManager().install())
# chrome_service = ChromeService('/usr/bin/chromedriver')

def get_towns_by_state(state: str, driver: webdriver.Chrome):
"""
Get a list of towns by state from municode.com
Expand Down Expand Up @@ -115,3 +97,23 @@ def identify_tbl(url: str, driver: webdriver.Chrome):
town_urls = town_urls_tbl['url'].tolist()

identify_tbl(town_urls[0], driver)

# DEPRECATIONS

# chrome_options = Options()

# determine if local or docker
# if os.getenv('DOCKER'):
# chrome_options.add_argument('--no-sandbox')
# chrome_options.add_argument('--headless')
# chrome_options.add_argument('--disable-dev-shm-usage')
# chrome_options.binary_location = '/usr/bin/google-chrome'
# chrome_options.add_argument('--disable-gpu')
# chrome_options.add_argument('--no-sandbox')
# chrome_options.add_argument('--headless')
# chrome_options.add_argument('--disable-dev-shm-usage')
# elif os.getenv('LOCAL') == 'True':
# chrome_options.add_experimental_option("detach", True)

# chrome_service = ChromeService(ChromeDriverManager().install())
# chrome_service = ChromeService('/usr/bin/chromedriver')

0 comments on commit a06fbe7

Please sign in to comment.