Skip to content

Commit

Permalink
clean code, remove chromedriver files
Browse files Browse the repository at this point in the history
  • Loading branch information
YoongiKim committed Sep 5, 2023
1 parent 43ac453 commit e1311d7
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
Binary file removed chromedriver/chromedriver_linux
Binary file not shown.
Binary file removed chromedriver/chromedriver_mac
Binary file not shown.
1 change: 0 additions & 1 deletion chromedriver/chromedriver_v87.0.4280.88.txt

This file was deleted.

Binary file removed chromedriver/chromedriver_win.exe
Binary file not shown.
19 changes: 0 additions & 19 deletions collect_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,15 @@
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.common.exceptions import ElementNotVisibleException, StaleElementReferenceException
import platform
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import os.path as osp


class CollectLinks:
def __init__(self, no_gui=False, proxy=None):
executable = ''

if platform.system() == 'Windows':
print('Detected OS : Windows')
executable = './chromedriver/chromedriver_win.exe'
elif platform.system() == 'Linux':
print('Detected OS : Linux')
executable = './chromedriver/chromedriver_linux'
elif platform.system() == 'Darwin':
print('Detected OS : Mac')
executable = './chromedriver/chromedriver_mac'
else:
raise OSError('Unknown OS Type')

if not osp.exists(executable):
raise FileNotFoundError('Chromedriver file should be placed at {}'.format(executable))

chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
Expand Down

0 comments on commit e1311d7

Please sign in to comment.