diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b9d21dc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,135 @@
+## My IDE
+
+.idea/
+
+## Python .gitignore template from GitHub
+
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
diff --git a/1/main.py b/1/main.py
deleted file mode 100644
index 2472655..0000000
--- a/1/main.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import os
-from selenium import webdriver
-
-os.environ['PATH'] += r"C:/SeleniumDrivers"
-driver = webdriver.Chrome()
-driver.get("https://www.seleniumeasy.com/test/jquery-download-progress-bar-demo.html")
-driver.implicitly_wait(30)
-my_element = driver.find_element_by_id('downloadButton')
-my_element.click()
\ No newline at end of file
diff --git a/2/main.py b/2/main.py
deleted file mode 100644
index 6ddba56..0000000
--- a/2/main.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import os
-from selenium import webdriver
-from selenium.webdriver.common.by import By
-from selenium.webdriver.support.ui import WebDriverWait
-from selenium.webdriver.support import expected_conditions as EC
-
-
-os.environ['PATH'] += r"C:/SeleniumDrivers"
-driver = webdriver.Chrome()
-driver.get("https://www.seleniumeasy.com/test/jquery-download-progress-bar-demo.html")
-driver.implicitly_wait(8)
-my_element = driver.find_element_by_id('downloadButton')
-my_element.click()
-
-WebDriverWait(driver, 30).until(
- EC.text_to_be_present_in_element(
- (By.CLASS_NAME, 'progress-label') , # Element filtration
- 'Complete!'# The expected text
- )
-)
\ No newline at end of file
diff --git a/3/main.py b/3/main.py
deleted file mode 100644
index 9c1d921..0000000
--- a/3/main.py
+++ /dev/null
@@ -1,23 +0,0 @@
-import os
-from selenium import webdriver
-from selenium.webdriver.common.keys import Keys
-
-os.environ['PATH'] += r"C:/SeleniumDrivers"
-driver = webdriver.Chrome()
-
-driver.get('https://www.seleniumeasy.com/test/basic-first-form-demo.html')
-driver.implicitly_wait(5)
-try:
- no_button = driver.find_element_by_class_name('at-cm-no-button')
- no_button.click()
-except:
- print('No element with this class name. Skipping ....')
-
-sum1 = driver.find_element_by_id('sum1')
-sum2 = driver.find_element_by_id('sum2')
-
-sum1.send_keys(Keys.NUMPAD1, Keys.NUMPAD5)
-sum2.send_keys(15)
-
-btn = driver.find_element_by_css_selector('button[onclick="return total()"]')
-btn.click()
\ No newline at end of file
diff --git a/Bot Project/04 - Structure a Bot Project/booking/booking.py b/Bot Project/04 - Structure a Bot Project/booking/booking.py
deleted file mode 100644
index 609929d..0000000
--- a/Bot Project/04 - Structure a Bot Project/booking/booking.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import booking.constants as const
-import os
-from selenium import webdriver
-
-
-class Booking(webdriver.Chrome):
- def __init__(self, driver_path=r"C:\SeleniumDrivers",
- teardown=False):
- self.driver_path = driver_path
- self.teardown = teardown
- os.environ['PATH'] += self.driver_path
- super(Booking, self).__init__()
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if self.teardown:
- self.quit()
-
- def land_first_page(self):
- self.get(const.BASE_URL)
diff --git a/Bot Project/04 - Structure a Bot Project/booking/constants.py b/Bot Project/04 - Structure a Bot Project/booking/constants.py
deleted file mode 100644
index 5ea7013..0000000
--- a/Bot Project/04 - Structure a Bot Project/booking/constants.py
+++ /dev/null
@@ -1 +0,0 @@
-BASE_URL = "https://www.booking.com"
\ No newline at end of file
diff --git a/Bot Project/04 - Structure a Bot Project/run.py b/Bot Project/04 - Structure a Bot Project/run.py
deleted file mode 100644
index 3b05541..0000000
--- a/Bot Project/04 - Structure a Bot Project/run.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from booking.booking import Booking
-
-
-with Booking() as bot:
- bot.land_first_page()
-
diff --git a/Bot Project/05 - Deal Searching Part 1/booking/__init__.py b/Bot Project/05 - Deal Searching Part 1/booking/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/Bot Project/05 - Deal Searching Part 1/booking/booking.py b/Bot Project/05 - Deal Searching Part 1/booking/booking.py
deleted file mode 100644
index ead8325..0000000
--- a/Bot Project/05 - Deal Searching Part 1/booking/booking.py
+++ /dev/null
@@ -1,43 +0,0 @@
-import booking.constants as const
-import os
-from selenium import webdriver
-
-
-class Booking(webdriver.Chrome):
- def __init__(self, driver_path=r"C:\SeleniumDrivers",
- teardown=False):
- self.driver_path = driver_path
- self.teardown = teardown
- os.environ['PATH'] += self.driver_path
- super(Booking, self).__init__()
- self.implicitly_wait(15)
- self.maximize_window()
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if self.teardown:
- self.quit()
-
- def land_first_page(self):
- self.get(const.BASE_URL)
-
- def change_currency(self, currency=None):
- currency_element = self.find_element_by_css_selector(
- 'button[data-tooltip-text="Choose your currency"]'
- )
- currency_element.click()
-
- selected_currency_element = self.find_element_by_css_selector(
- f'a[data-modal-header-async-url-param*="selected_currency={currency}"]'
- )
- selected_currency_element.click()
-
-
- def select_place_to_go(self, place_to_go):
- search_field = self.find_element_by_id('ss')
- search_field.clear()
- search_field.send_keys(place_to_go)
-
- first_result = self.find_element_by_css_selector(
- 'li[data-i="0"]'
- )
- first_result.click()
diff --git a/Bot Project/05 - Deal Searching Part 1/booking/constants.py b/Bot Project/05 - Deal Searching Part 1/booking/constants.py
deleted file mode 100644
index 5ea7013..0000000
--- a/Bot Project/05 - Deal Searching Part 1/booking/constants.py
+++ /dev/null
@@ -1 +0,0 @@
-BASE_URL = "https://www.booking.com"
\ No newline at end of file
diff --git a/Bot Project/05 - Deal Searching Part 1/run.py b/Bot Project/05 - Deal Searching Part 1/run.py
deleted file mode 100644
index 0400fc3..0000000
--- a/Bot Project/05 - Deal Searching Part 1/run.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from booking.booking import Booking
-
-
-with Booking() as bot:
- bot.land_first_page()
- bot.change_currency(currency='USD')
- bot.select_place_to_go('New York')
diff --git a/Bot Project/06 - Deal Searching Part 2/booking/__init__.py b/Bot Project/06 - Deal Searching Part 2/booking/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/Bot Project/06 - Deal Searching Part 2/booking/booking.py b/Bot Project/06 - Deal Searching Part 2/booking/booking.py
deleted file mode 100644
index bcf8a15..0000000
--- a/Bot Project/06 - Deal Searching Part 2/booking/booking.py
+++ /dev/null
@@ -1,88 +0,0 @@
-import booking.constants as const
-import os
-from selenium import webdriver
-from booking.booking_filtration import BookingFiltration
-
-
-class Booking(webdriver.Chrome):
- def __init__(self, driver_path=r"C:\SeleniumDrivers",
- teardown=False):
- self.driver_path = driver_path
- self.teardown = teardown
- os.environ['PATH'] += self.driver_path
- super(Booking, self).__init__()
- self.implicitly_wait(15)
- self.maximize_window()
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if self.teardown:
- self.quit()
-
- def land_first_page(self):
- self.get(const.BASE_URL)
-
- def change_currency(self, currency=None):
- currency_element = self.find_element_by_css_selector(
- 'button[data-tooltip-text="Choose your currency"]'
- )
- currency_element.click()
-
- selected_currency_element = self.find_element_by_css_selector(
- f'a[data-modal-header-async-url-param*="selected_currency={currency}"]'
- )
- selected_currency_element.click()
-
-
- def select_place_to_go(self, place_to_go):
- search_field = self.find_element_by_id('ss')
- search_field.clear()
- search_field.send_keys(place_to_go)
-
- first_result = self.find_element_by_css_selector(
- 'li[data-i="0"]'
- )
- first_result.click()
-
- def select_dates(self, check_in_date, check_out_date):
- check_in_element = self.find_element_by_css_selector(
- f'td[data-date="{check_in_date}"]'
- )
- check_in_element.click()
-
- check_out_element = self.find_element_by_css_selector(
- f'td[data-date="{check_out_date}"]'
- )
- check_out_element.click()
-
- def select_adults(self, count=1):
- selection_element = self.find_element_by_id('xp__guests__toggle')
- selection_element.click()
-
- while True:
- decrease_adults_element = self.find_element_by_css_selector(
- 'button[aria-label="Decrease number of Adults"]'
- )
- decrease_adults_element.click()
- #If the value of adults reaches 1, then we should get out
- #of the while loop
- adults_value_element = self.find_element_by_id('group_adults')
- adults_value = adults_value_element.get_attribute(
- 'value'
- ) # Should give back the adults count
-
- if int(adults_value) == 1:
- break
-
- increase_button_element = self.find_element_by_css_selector(
- 'button[aria-label="Increase number of Adults"]'
- )
-
- for _ in range(count - 1):
- increase_button_element.click()
-
- def click_search(self):
- search_button = self.find_element_by_css_selector(
- 'button[type="submit"]'
- )
- search_button.click()
-
diff --git a/Bot Project/06 - Deal Searching Part 2/booking/constants.py b/Bot Project/06 - Deal Searching Part 2/booking/constants.py
deleted file mode 100644
index 5ea7013..0000000
--- a/Bot Project/06 - Deal Searching Part 2/booking/constants.py
+++ /dev/null
@@ -1 +0,0 @@
-BASE_URL = "https://www.booking.com"
\ No newline at end of file
diff --git a/Bot Project/06 - Deal Searching Part 2/run.py b/Bot Project/06 - Deal Searching Part 2/run.py
deleted file mode 100644
index 6801fcc..0000000
--- a/Bot Project/06 - Deal Searching Part 2/run.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from booking.booking import Booking
-
-
-with Booking() as bot:
- bot.land_first_page()
- bot.change_currency(currency='USD')
- bot.select_place_to_go('New York')
- bot.select_dates(check_in_date='2021-05-19',
- check_out_date='2021-05-25')
- bot.select_adults(1)
- bot.click_search()
-
diff --git a/Bot Project/07 - Booking Filtrations/booking/__init__.py b/Bot Project/07 - Booking Filtrations/booking/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/Bot Project/07 - Booking Filtrations/booking/__pycache__/__init__.cpython-38.pyc b/Bot Project/07 - Booking Filtrations/booking/__pycache__/__init__.cpython-38.pyc
deleted file mode 100644
index 55b93e9..0000000
Binary files a/Bot Project/07 - Booking Filtrations/booking/__pycache__/__init__.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/07 - Booking Filtrations/booking/__pycache__/__init__.cpython-39.pyc b/Bot Project/07 - Booking Filtrations/booking/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index 0d5aa5a..0000000
Binary files a/Bot Project/07 - Booking Filtrations/booking/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking.cpython-38.pyc b/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking.cpython-38.pyc
deleted file mode 100644
index e113d35..0000000
Binary files a/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking.cpython-39.pyc b/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking.cpython-39.pyc
deleted file mode 100644
index 9c264d7..0000000
Binary files a/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking_filtration.cpython-38.pyc b/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking_filtration.cpython-38.pyc
deleted file mode 100644
index ea80929..0000000
Binary files a/Bot Project/07 - Booking Filtrations/booking/__pycache__/booking_filtration.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/07 - Booking Filtrations/booking/__pycache__/constants.cpython-38.pyc b/Bot Project/07 - Booking Filtrations/booking/__pycache__/constants.cpython-38.pyc
deleted file mode 100644
index 16e8a32..0000000
Binary files a/Bot Project/07 - Booking Filtrations/booking/__pycache__/constants.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/07 - Booking Filtrations/booking/__pycache__/constants.cpython-39.pyc b/Bot Project/07 - Booking Filtrations/booking/__pycache__/constants.cpython-39.pyc
deleted file mode 100644
index c359792..0000000
Binary files a/Bot Project/07 - Booking Filtrations/booking/__pycache__/constants.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/07 - Booking Filtrations/booking/booking.py b/Bot Project/07 - Booking Filtrations/booking/booking.py
deleted file mode 100644
index e6ce8b7..0000000
--- a/Bot Project/07 - Booking Filtrations/booking/booking.py
+++ /dev/null
@@ -1,94 +0,0 @@
-import booking.constants as const
-import os
-from selenium import webdriver
-from booking.booking_filtration import BookingFiltration
-
-
-class Booking(webdriver.Chrome):
- def __init__(self, driver_path=r"C:\SeleniumDrivers",
- teardown=False):
- self.driver_path = driver_path
- self.teardown = teardown
- os.environ['PATH'] += self.driver_path
- super(Booking, self).__init__()
- self.implicitly_wait(15)
- self.maximize_window()
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if self.teardown:
- self.quit()
-
- def land_first_page(self):
- self.get(const.BASE_URL)
-
- def change_currency(self, currency=None):
- currency_element = self.find_element_by_css_selector(
- 'button[data-tooltip-text="Choose your currency"]'
- )
- currency_element.click()
-
- selected_currency_element = self.find_element_by_css_selector(
- f'a[data-modal-header-async-url-param*="selected_currency={currency}"]'
- )
- selected_currency_element.click()
-
-
- def select_place_to_go(self, place_to_go):
- search_field = self.find_element_by_id('ss')
- search_field.clear()
- search_field.send_keys(place_to_go)
-
- first_result = self.find_element_by_css_selector(
- 'li[data-i="0"]'
- )
- first_result.click()
-
- def select_dates(self, check_in_date, check_out_date):
- check_in_element = self.find_element_by_css_selector(
- f'td[data-date="{check_in_date}"]'
- )
- check_in_element.click()
-
- check_out_element = self.find_element_by_css_selector(
- f'td[data-date="{check_out_date}"]'
- )
- check_out_element.click()
-
- def select_adults(self, count=1):
- selection_element = self.find_element_by_id('xp__guests__toggle')
- selection_element.click()
-
- while True:
- decrease_adults_element = self.find_element_by_css_selector(
- 'button[aria-label="Decrease number of Adults"]'
- )
- decrease_adults_element.click()
- #If the value of adults reaches 1, then we should get out
- #of the while loop
- adults_value_element = self.find_element_by_id('group_adults')
- adults_value = adults_value_element.get_attribute(
- 'value'
- ) # Should give back the adults count
-
- if int(adults_value) == 1:
- break
-
- increase_button_element = self.find_element_by_css_selector(
- 'button[aria-label="Increase number of Adults"]'
- )
-
- for _ in range(count - 1):
- increase_button_element.click()
-
- def click_search(self):
- search_button = self.find_element_by_css_selector(
- 'button[type="submit"]'
- )
- search_button.click()
-
- def apply_filtrations(self):
- filtration = BookingFiltration(driver=self)
- filtration.apply_star_rating(4, 5)
-
- filtration.sort_price_lowest_first()
-
diff --git a/Bot Project/07 - Booking Filtrations/booking/booking_filtration.py b/Bot Project/07 - Booking Filtrations/booking/booking_filtration.py
deleted file mode 100644
index e352aba..0000000
--- a/Bot Project/07 - Booking Filtrations/booking/booking_filtration.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#This file will include a class with instance methods.
-#That will be responsible to interact with our website
-#After we have some results, to apply filtrations.
-from selenium.webdriver.remote.webdriver import WebDriver
-
-class BookingFiltration:
- def __init__(self, driver:WebDriver):
- self.driver = driver
-
- def apply_star_rating(self, *star_values):
- star_filtration_box = self.driver.find_element_by_id('filter_class')
- star_child_elements = star_filtration_box.find_elements_by_css_selector('*')
-
- for star_value in star_values:
- for star_element in star_child_elements:
- if str(star_element.get_attribute('innerHTML')).strip() == f'{star_value} stars':
- star_element.click()
-
-
- def sort_price_lowest_first(self):
- element = self.driver.find_element_by_css_selector(
- 'li[data-id="price"]'
- )
- element.click()
\ No newline at end of file
diff --git a/Bot Project/07 - Booking Filtrations/booking/constants.py b/Bot Project/07 - Booking Filtrations/booking/constants.py
deleted file mode 100644
index 5ea7013..0000000
--- a/Bot Project/07 - Booking Filtrations/booking/constants.py
+++ /dev/null
@@ -1 +0,0 @@
-BASE_URL = "https://www.booking.com"
\ No newline at end of file
diff --git a/Bot Project/07 - Booking Filtrations/run.py b/Bot Project/07 - Booking Filtrations/run.py
deleted file mode 100644
index a1c52bb..0000000
--- a/Bot Project/07 - Booking Filtrations/run.py
+++ /dev/null
@@ -1,13 +0,0 @@
-from booking.booking import Booking
-
-
-with Booking() as bot:
- bot.land_first_page()
- bot.change_currency(currency='USD')
- bot.select_place_to_go('New York')
- bot.select_dates(check_in_date='2021-05-19',
- check_out_date='2021-05-25')
- bot.select_adults(1)
- bot.click_search()
- bot.apply_filtrations()
-
diff --git a/Bot Project/08 - Execution from a CLI/booking/__init__.py b/Bot Project/08 - Execution from a CLI/booking/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/Bot Project/08 - Execution from a CLI/booking/__pycache__/__init__.cpython-38.pyc b/Bot Project/08 - Execution from a CLI/booking/__pycache__/__init__.cpython-38.pyc
deleted file mode 100644
index 55b93e9..0000000
Binary files a/Bot Project/08 - Execution from a CLI/booking/__pycache__/__init__.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/08 - Execution from a CLI/booking/__pycache__/__init__.cpython-39.pyc b/Bot Project/08 - Execution from a CLI/booking/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index 0d5aa5a..0000000
Binary files a/Bot Project/08 - Execution from a CLI/booking/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking.cpython-38.pyc b/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking.cpython-38.pyc
deleted file mode 100644
index 75b1975..0000000
Binary files a/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking.cpython-39.pyc b/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking.cpython-39.pyc
deleted file mode 100644
index 9c264d7..0000000
Binary files a/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking_filtration.cpython-38.pyc b/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking_filtration.cpython-38.pyc
deleted file mode 100644
index ea80929..0000000
Binary files a/Bot Project/08 - Execution from a CLI/booking/__pycache__/booking_filtration.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/08 - Execution from a CLI/booking/__pycache__/constants.cpython-38.pyc b/Bot Project/08 - Execution from a CLI/booking/__pycache__/constants.cpython-38.pyc
deleted file mode 100644
index 16e8a32..0000000
Binary files a/Bot Project/08 - Execution from a CLI/booking/__pycache__/constants.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/08 - Execution from a CLI/booking/__pycache__/constants.cpython-39.pyc b/Bot Project/08 - Execution from a CLI/booking/__pycache__/constants.cpython-39.pyc
deleted file mode 100644
index c359792..0000000
Binary files a/Bot Project/08 - Execution from a CLI/booking/__pycache__/constants.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/08 - Execution from a CLI/booking/booking.py b/Bot Project/08 - Execution from a CLI/booking/booking.py
deleted file mode 100644
index 795c461..0000000
--- a/Bot Project/08 - Execution from a CLI/booking/booking.py
+++ /dev/null
@@ -1,96 +0,0 @@
-import booking.constants as const
-import os
-from selenium import webdriver
-from booking.booking_filtration import BookingFiltration
-
-
-class Booking(webdriver.Chrome):
- def __init__(self, driver_path=r"C:\SeleniumDrivers",
- teardown=False):
- self.driver_path = driver_path
- self.teardown = teardown
- os.environ['PATH'] += self.driver_path
- options = webdriver.ChromeOptions()
- options.add_experimental_option('excludeSwitches', ['enable-logging'])
- super(Booking, self).__init__(options=options)
- self.implicitly_wait(15)
- self.maximize_window()
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if self.teardown:
- self.quit()
-
- def land_first_page(self):
- self.get(const.BASE_URL)
-
- def change_currency(self, currency=None):
- currency_element = self.find_element_by_css_selector(
- 'button[data-tooltip-text="Choose your currency"]'
- )
- currency_element.click()
-
- selected_currency_element = self.find_element_by_css_selector(
- f'a[data-modal-header-async-url-param*="selected_currency={currency}"]'
- )
- selected_currency_element.click()
-
-
- def select_place_to_go(self, place_to_go):
- search_field = self.find_element_by_id('ss')
- search_field.clear()
- search_field.send_keys(place_to_go)
-
- first_result = self.find_element_by_css_selector(
- 'li[data-i="0"]'
- )
- first_result.click()
-
- def select_dates(self, check_in_date, check_out_date):
- check_in_element = self.find_element_by_css_selector(
- f'td[data-date="{check_in_date}"]'
- )
- check_in_element.click()
-
- check_out_element = self.find_element_by_css_selector(
- f'td[data-date="{check_out_date}"]'
- )
- check_out_element.click()
-
- def select_adults(self, count=1):
- selection_element = self.find_element_by_id('xp__guests__toggle')
- selection_element.click()
-
- while True:
- decrease_adults_element = self.find_element_by_css_selector(
- 'button[aria-label="Decrease number of Adults"]'
- )
- decrease_adults_element.click()
- #If the value of adults reaches 1, then we should get out
- #of the while loop
- adults_value_element = self.find_element_by_id('group_adults')
- adults_value = adults_value_element.get_attribute(
- 'value'
- ) # Should give back the adults count
-
- if int(adults_value) == 1:
- break
-
- increase_button_element = self.find_element_by_css_selector(
- 'button[aria-label="Increase number of Adults"]'
- )
-
- for _ in range(count - 1):
- increase_button_element.click()
-
- def click_search(self):
- search_button = self.find_element_by_css_selector(
- 'button[type="submit"]'
- )
- search_button.click()
-
- def apply_filtrations(self):
- filtration = BookingFiltration(driver=self)
- filtration.apply_star_rating(4, 5)
-
- filtration.sort_price_lowest_first()
-
diff --git a/Bot Project/08 - Execution from a CLI/booking/booking_filtration.py b/Bot Project/08 - Execution from a CLI/booking/booking_filtration.py
deleted file mode 100644
index e352aba..0000000
--- a/Bot Project/08 - Execution from a CLI/booking/booking_filtration.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#This file will include a class with instance methods.
-#That will be responsible to interact with our website
-#After we have some results, to apply filtrations.
-from selenium.webdriver.remote.webdriver import WebDriver
-
-class BookingFiltration:
- def __init__(self, driver:WebDriver):
- self.driver = driver
-
- def apply_star_rating(self, *star_values):
- star_filtration_box = self.driver.find_element_by_id('filter_class')
- star_child_elements = star_filtration_box.find_elements_by_css_selector('*')
-
- for star_value in star_values:
- for star_element in star_child_elements:
- if str(star_element.get_attribute('innerHTML')).strip() == f'{star_value} stars':
- star_element.click()
-
-
- def sort_price_lowest_first(self):
- element = self.driver.find_element_by_css_selector(
- 'li[data-id="price"]'
- )
- element.click()
\ No newline at end of file
diff --git a/Bot Project/08 - Execution from a CLI/booking/constants.py b/Bot Project/08 - Execution from a CLI/booking/constants.py
deleted file mode 100644
index 5ea7013..0000000
--- a/Bot Project/08 - Execution from a CLI/booking/constants.py
+++ /dev/null
@@ -1 +0,0 @@
-BASE_URL = "https://www.booking.com"
\ No newline at end of file
diff --git a/Bot Project/08 - Execution from a CLI/run.py b/Bot Project/08 - Execution from a CLI/run.py
deleted file mode 100644
index 00785da..0000000
--- a/Bot Project/08 - Execution from a CLI/run.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from booking.booking import Booking
-
-try:
- with Booking() as bot:
- bot.land_first_page()
- bot.change_currency(currency='USD')
- bot.select_place_to_go('New York')
- bot.select_dates(check_in_date='2021-05-19',
- check_out_date='2021-05-25')
- bot.select_adults(1)
- bot.click_search()
- bot.apply_filtrations()
-
-except Exception as e:
- if 'in PATH' in str(e):
- print(
- 'You are trying to run the bot from command line \n'
- 'Please add to PATH your Selenium Drivers \n'
- 'Windows: \n'
- ' set PATH=%PATH%;C:path-to-your-folder \n \n'
- 'Linux: \n'
- ' PATH=$PATH:/path/toyour/folder/ \n'
- )
- else:
- raise
\ No newline at end of file
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__init__.py b/Bot Project/09 - Deal Reporting Part 1/booking/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/__init__.cpython-38.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/__init__.cpython-38.pyc
deleted file mode 100644
index 55b93e9..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/__init__.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/__init__.cpython-39.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index 0d5aa5a..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking.cpython-38.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking.cpython-38.pyc
deleted file mode 100644
index efe4bcb..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking.cpython-39.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking.cpython-39.pyc
deleted file mode 100644
index 9c264d7..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking_filtration.cpython-38.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking_filtration.cpython-38.pyc
deleted file mode 100644
index ea80929..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking_filtration.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking_report.cpython-38.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking_report.cpython-38.pyc
deleted file mode 100644
index 285ffb7..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/booking_report.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/constants.cpython-38.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/constants.cpython-38.pyc
deleted file mode 100644
index 16e8a32..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/constants.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/constants.cpython-39.pyc b/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/constants.cpython-39.pyc
deleted file mode 100644
index c359792..0000000
Binary files a/Bot Project/09 - Deal Reporting Part 1/booking/__pycache__/constants.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/booking.py b/Bot Project/09 - Deal Reporting Part 1/booking/booking.py
deleted file mode 100644
index f3eb503..0000000
--- a/Bot Project/09 - Deal Reporting Part 1/booking/booking.py
+++ /dev/null
@@ -1,103 +0,0 @@
-import booking.constants as const
-import os
-from selenium import webdriver
-from booking.booking_filtration import BookingFiltration
-from booking.booking_report import BookingReport
-
-class Booking(webdriver.Chrome):
- def __init__(self, driver_path=r"C:\SeleniumDrivers",
- teardown=False):
- self.driver_path = driver_path
- self.teardown = teardown
- os.environ['PATH'] += self.driver_path
- options = webdriver.ChromeOptions()
- options.add_experimental_option('excludeSwitches', ['enable-logging'])
- super(Booking, self).__init__(options=options)
- self.implicitly_wait(15)
- self.maximize_window()
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if self.teardown:
- self.quit()
-
- def land_first_page(self):
- self.get(const.BASE_URL)
-
- def change_currency(self, currency=None):
- currency_element = self.find_element_by_css_selector(
- 'button[data-tooltip-text="Choose your currency"]'
- )
- currency_element.click()
-
- selected_currency_element = self.find_element_by_css_selector(
- f'a[data-modal-header-async-url-param*="selected_currency={currency}"]'
- )
- selected_currency_element.click()
-
-
- def select_place_to_go(self, place_to_go):
- search_field = self.find_element_by_id('ss')
- search_field.clear()
- search_field.send_keys(place_to_go)
-
- first_result = self.find_element_by_css_selector(
- 'li[data-i="0"]'
- )
- first_result.click()
-
- def select_dates(self, check_in_date, check_out_date):
- check_in_element = self.find_element_by_css_selector(
- f'td[data-date="{check_in_date}"]'
- )
- check_in_element.click()
-
- check_out_element = self.find_element_by_css_selector(
- f'td[data-date="{check_out_date}"]'
- )
- check_out_element.click()
-
- def select_adults(self, count=1):
- selection_element = self.find_element_by_id('xp__guests__toggle')
- selection_element.click()
-
- while True:
- decrease_adults_element = self.find_element_by_css_selector(
- 'button[aria-label="Decrease number of Adults"]'
- )
- decrease_adults_element.click()
- #If the value of adults reaches 1, then we should get out
- #of the while loop
- adults_value_element = self.find_element_by_id('group_adults')
- adults_value = adults_value_element.get_attribute(
- 'value'
- ) # Should give back the adults count
-
- if int(adults_value) == 1:
- break
-
- increase_button_element = self.find_element_by_css_selector(
- 'button[aria-label="Increase number of Adults"]'
- )
-
- for _ in range(count - 1):
- increase_button_element.click()
-
- def click_search(self):
- search_button = self.find_element_by_css_selector(
- 'button[type="submit"]'
- )
- search_button.click()
-
- def apply_filtrations(self):
- filtration = BookingFiltration(driver=self)
- filtration.apply_star_rating(4, 5)
-
- filtration.sort_price_lowest_first()
-
- def report_results(self):
- hotel_boxes = self.find_element_by_id(
- 'hotellist_inner'
- )
-
- report = BookingReport(hotel_boxes)
- report.pull_titles()
\ No newline at end of file
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/booking_filtration.py b/Bot Project/09 - Deal Reporting Part 1/booking/booking_filtration.py
deleted file mode 100644
index e352aba..0000000
--- a/Bot Project/09 - Deal Reporting Part 1/booking/booking_filtration.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#This file will include a class with instance methods.
-#That will be responsible to interact with our website
-#After we have some results, to apply filtrations.
-from selenium.webdriver.remote.webdriver import WebDriver
-
-class BookingFiltration:
- def __init__(self, driver:WebDriver):
- self.driver = driver
-
- def apply_star_rating(self, *star_values):
- star_filtration_box = self.driver.find_element_by_id('filter_class')
- star_child_elements = star_filtration_box.find_elements_by_css_selector('*')
-
- for star_value in star_values:
- for star_element in star_child_elements:
- if str(star_element.get_attribute('innerHTML')).strip() == f'{star_value} stars':
- star_element.click()
-
-
- def sort_price_lowest_first(self):
- element = self.driver.find_element_by_css_selector(
- 'li[data-id="price"]'
- )
- element.click()
\ No newline at end of file
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/booking_report.py b/Bot Project/09 - Deal Reporting Part 1/booking/booking_report.py
deleted file mode 100644
index 40b3599..0000000
--- a/Bot Project/09 - Deal Reporting Part 1/booking/booking_report.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file is going to include method that will parse
-# The specific data that we need from each one of the deal boxes.
-from selenium.webdriver.remote.webelement import WebElement
-
-
-class BookingReport:
- def __init__(self, boxes_section_element:WebElement):
- self.boxes_section_element = boxes_section_element
- self.deal_boxes = self.pull_deal_boxes()
-
- def pull_deal_boxes(self):
- return self.boxes_section_element.find_elements_by_class_name(
- 'sr_property_block'
- )
-
- def pull_titles(self):
- for deal_box in self.deal_boxes:
- hotel_name = deal_box.find_element_by_class_name(
- 'sr-hotel__name'
- ).get_attribute('innerHTML').strip()
- print(hotel_name)
\ No newline at end of file
diff --git a/Bot Project/09 - Deal Reporting Part 1/booking/constants.py b/Bot Project/09 - Deal Reporting Part 1/booking/constants.py
deleted file mode 100644
index 5ea7013..0000000
--- a/Bot Project/09 - Deal Reporting Part 1/booking/constants.py
+++ /dev/null
@@ -1 +0,0 @@
-BASE_URL = "https://www.booking.com"
\ No newline at end of file
diff --git a/Bot Project/09 - Deal Reporting Part 1/run.py b/Bot Project/09 - Deal Reporting Part 1/run.py
deleted file mode 100644
index b1754fc..0000000
--- a/Bot Project/09 - Deal Reporting Part 1/run.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from booking.booking import Booking
-
-try:
- with Booking() as bot:
- bot.land_first_page()
- bot.change_currency(currency='USD')
- bot.select_place_to_go('New York')
- bot.select_dates(check_in_date='2021-05-19',
- check_out_date='2021-05-25')
- bot.select_adults(1)
- bot.click_search()
- bot.apply_filtrations()
- bot.refresh() # A workaround to let our bot to grab the data properly
- bot.report_results()
-
-except Exception as e:
- if 'in PATH' in str(e):
- print(
- 'You are trying to run the bot from command line \n'
- 'Please add to PATH your Selenium Drivers \n'
- 'Windows: \n'
- ' set PATH=%PATH%;C:path-to-your-folder \n \n'
- 'Linux: \n'
- ' PATH=$PATH:/path/toyour/folder/ \n'
- )
- else:
- raise
\ No newline at end of file
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__init__.py b/Bot Project/10 - Deal Reporting Part 2/booking/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/__init__.cpython-38.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/__init__.cpython-38.pyc
deleted file mode 100644
index 55b93e9..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/__init__.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/__init__.cpython-39.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index 0d5aa5a..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/__init__.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking.cpython-38.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking.cpython-38.pyc
deleted file mode 100644
index f344689..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking.cpython-39.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking.cpython-39.pyc
deleted file mode 100644
index 9c264d7..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking_filtration.cpython-38.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking_filtration.cpython-38.pyc
deleted file mode 100644
index ea80929..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking_filtration.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking_report.cpython-38.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking_report.cpython-38.pyc
deleted file mode 100644
index dd8a593..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/booking_report.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/constants.cpython-38.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/constants.cpython-38.pyc
deleted file mode 100644
index 16e8a32..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/constants.cpython-38.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/constants.cpython-39.pyc b/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/constants.cpython-39.pyc
deleted file mode 100644
index c359792..0000000
Binary files a/Bot Project/10 - Deal Reporting Part 2/booking/__pycache__/constants.cpython-39.pyc and /dev/null differ
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/booking.py b/Bot Project/10 - Deal Reporting Part 2/booking/booking.py
deleted file mode 100644
index 041fdca..0000000
--- a/Bot Project/10 - Deal Reporting Part 2/booking/booking.py
+++ /dev/null
@@ -1,108 +0,0 @@
-import booking.constants as const
-import os
-from selenium import webdriver
-from booking.booking_filtration import BookingFiltration
-from booking.booking_report import BookingReport
-from prettytable import PrettyTable
-
-class Booking(webdriver.Chrome):
- def __init__(self, driver_path=r"C:\SeleniumDrivers",
- teardown=False):
- self.driver_path = driver_path
- self.teardown = teardown
- os.environ['PATH'] += self.driver_path
- options = webdriver.ChromeOptions()
- options.add_experimental_option('excludeSwitches', ['enable-logging'])
- super(Booking, self).__init__(options=options)
- self.implicitly_wait(15)
- self.maximize_window()
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if self.teardown:
- self.quit()
-
- def land_first_page(self):
- self.get(const.BASE_URL)
-
- def change_currency(self, currency=None):
- currency_element = self.find_element_by_css_selector(
- 'button[data-tooltip-text="Choose your currency"]'
- )
- currency_element.click()
-
- selected_currency_element = self.find_element_by_css_selector(
- f'a[data-modal-header-async-url-param*="selected_currency={currency}"]'
- )
- selected_currency_element.click()
-
-
- def select_place_to_go(self, place_to_go):
- search_field = self.find_element_by_id('ss')
- search_field.clear()
- search_field.send_keys(place_to_go)
-
- first_result = self.find_element_by_css_selector(
- 'li[data-i="0"]'
- )
- first_result.click()
-
- def select_dates(self, check_in_date, check_out_date):
- check_in_element = self.find_element_by_css_selector(
- f'td[data-date="{check_in_date}"]'
- )
- check_in_element.click()
-
- check_out_element = self.find_element_by_css_selector(
- f'td[data-date="{check_out_date}"]'
- )
- check_out_element.click()
-
- def select_adults(self, count=1):
- selection_element = self.find_element_by_id('xp__guests__toggle')
- selection_element.click()
-
- while True:
- decrease_adults_element = self.find_element_by_css_selector(
- 'button[aria-label="Decrease number of Adults"]'
- )
- decrease_adults_element.click()
- #If the value of adults reaches 1, then we should get out
- #of the while loop
- adults_value_element = self.find_element_by_id('group_adults')
- adults_value = adults_value_element.get_attribute(
- 'value'
- ) # Should give back the adults count
-
- if int(adults_value) == 1:
- break
-
- increase_button_element = self.find_element_by_css_selector(
- 'button[aria-label="Increase number of Adults"]'
- )
-
- for _ in range(count - 1):
- increase_button_element.click()
-
- def click_search(self):
- search_button = self.find_element_by_css_selector(
- 'button[type="submit"]'
- )
- search_button.click()
-
- def apply_filtrations(self):
- filtration = BookingFiltration(driver=self)
- filtration.apply_star_rating(4, 5)
-
- filtration.sort_price_lowest_first()
-
- def report_results(self):
- hotel_boxes = self.find_element_by_id(
- 'hotellist_inner'
- )
-
- report = BookingReport(hotel_boxes)
- table = PrettyTable(
- field_names=["Hotel Name", "Hotel Price", "Hotel Score"]
- )
- table.add_rows(report.pull_deal_box_attributes())
- print(table)
\ No newline at end of file
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/booking_filtration.py b/Bot Project/10 - Deal Reporting Part 2/booking/booking_filtration.py
deleted file mode 100644
index e352aba..0000000
--- a/Bot Project/10 - Deal Reporting Part 2/booking/booking_filtration.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#This file will include a class with instance methods.
-#That will be responsible to interact with our website
-#After we have some results, to apply filtrations.
-from selenium.webdriver.remote.webdriver import WebDriver
-
-class BookingFiltration:
- def __init__(self, driver:WebDriver):
- self.driver = driver
-
- def apply_star_rating(self, *star_values):
- star_filtration_box = self.driver.find_element_by_id('filter_class')
- star_child_elements = star_filtration_box.find_elements_by_css_selector('*')
-
- for star_value in star_values:
- for star_element in star_child_elements:
- if str(star_element.get_attribute('innerHTML')).strip() == f'{star_value} stars':
- star_element.click()
-
-
- def sort_price_lowest_first(self):
- element = self.driver.find_element_by_css_selector(
- 'li[data-id="price"]'
- )
- element.click()
\ No newline at end of file
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/booking_report.py b/Bot Project/10 - Deal Reporting Part 2/booking/booking_report.py
deleted file mode 100644
index aedb64a..0000000
--- a/Bot Project/10 - Deal Reporting Part 2/booking/booking_report.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# This file is going to include method that will parse
-# The specific data that we need from each one of the deal boxes.
-from selenium.webdriver.remote.webelement import WebElement
-
-
-class BookingReport:
- def __init__(self, boxes_section_element:WebElement):
- self.boxes_section_element = boxes_section_element
- self.deal_boxes = self.pull_deal_boxes()
-
- def pull_deal_boxes(self):
- return self.boxes_section_element.find_elements_by_class_name(
- 'sr_property_block'
- )
-
- def pull_deal_box_attributes(self):
- collection = []
- for deal_box in self.deal_boxes:
- # Pulling the hotel name
- hotel_name = deal_box.find_element_by_class_name(
- 'sr-hotel__name'
- ).get_attribute('innerHTML').strip()
- hotel_price = deal_box.find_element_by_class_name(
- 'bui-price-display__value'
- ).get_attribute('innerHTML').strip()
- hotel_score = deal_box.get_attribute(
- 'data-score'
- ).strip()
-
- collection.append(
- [hotel_name, hotel_price, hotel_score]
- )
- return collection
\ No newline at end of file
diff --git a/Bot Project/10 - Deal Reporting Part 2/booking/constants.py b/Bot Project/10 - Deal Reporting Part 2/booking/constants.py
deleted file mode 100644
index 5ea7013..0000000
--- a/Bot Project/10 - Deal Reporting Part 2/booking/constants.py
+++ /dev/null
@@ -1 +0,0 @@
-BASE_URL = "https://www.booking.com"
\ No newline at end of file
diff --git a/Bot Project/10 - Deal Reporting Part 2/run.py b/Bot Project/10 - Deal Reporting Part 2/run.py
deleted file mode 100644
index e3a34c2..0000000
--- a/Bot Project/10 - Deal Reporting Part 2/run.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from booking.booking import Booking
-
-try:
- with Booking() as bot:
- bot.land_first_page()
- bot.change_currency(currency='USD')
- bot.select_place_to_go(input("Where you want to go ?"))
- bot.select_dates(check_in_date=input("What is the check in date ?"),
- check_out_date=input("What is the check out date ?"))
- bot.select_adults(int(input("How many people ?")))
- bot.click_search()
- bot.apply_filtrations()
- bot.refresh() # A workaround to let our bot to grab the data properly
- bot.report_results()
-
-except Exception as e:
- if 'in PATH' in str(e):
- print(
- 'You are trying to run the bot from command line \n'
- 'Please add to PATH your Selenium Drivers \n'
- 'Windows: \n'
- ' set PATH=%PATH%;C:path-to-your-folder \n \n'
- 'Linux: \n'
- ' PATH=$PATH:/path/toyour/folder/ \n'
- )
- else:
- raise
\ No newline at end of file
diff --git a/README.md b/README.md
index a777f28..ba92c2e 100644
--- a/README.md
+++ b/README.md
@@ -1,33 +1,68 @@
-# Selenium Series by JimShapedCoding
-
-## Prerequisites:
- - Python Installed (Recommended version 3.8 or above)
- - IDE or Text Editor configured with Python Installed (PyCharm/ Visual Code/ Sublime Text)
- - Pip Package Manager (use `pip install selenium`)
- - Driver for launching the automation (We will use chromedriver.exe)
- - Be sure to match the version of Chrome you have
- - [Download From this URL](https://chromedriver.storage.googleapis.com/index.html)
-
-## What you will learn ?
-
- - Selenium with Python Basics
- - Best practices for element identification on websites
- - The most useful methods
- - Explicit wait vs Implicit wait
- - Selenium Booking Project (Online Bot)
- - OOP Project, how to maintain code in Selenium Projects
- - Context Manager in Selenium Projects
- - Using different arguments to launch different bots
- - Selenium Unittest Project (Web Application Testing)
- - What is Unittest? Why we need to test our applications?
- - Testcase writing, reporting
- - Deciding how to fail/pass a test
-
-## What you should know before starting this series ?
- - [Python Basics Full Course](https://www.youtube.com/watch?v=m0LdKZ-prto)
- - [Python Context Managers](https://www.youtube.com/watch?v=9TRKdYVzXA)
-
-
-