add requirements.txt

This commit is contained in:
2022-02-25 11:19:36 +01:00
parent 4f78c79463
commit 00d4196a3e
6 changed files with 69 additions and 4 deletions
+32
View File
@@ -0,0 +1,32 @@
import playwright
from playwright.sync_api import sync_playwright
from db.DbManager import DataManager
from pojo.ReserveResultPojo import ReserveResultPojo
# check result with playright
def check_result_page(url):
with sync_playwright() as p:
run(p, url)
def run(playwright, url):
pixel_2 = playwright.devices['Pixel 2']
browser = playwright.webkit.launch(headless=False)
page = browser.new_page()
url_to_check = url.replace("register/", "")
print(url_to_check)
page.goto(url_to_check)
print(page.title())
print(page.content())
browser.close()
if __name__ == '__main__':
# get the list
db_manager = DataManager()
for appointment in db_manager.get_all_successful_items():
result = ReserveResultPojo.from_firestore_dict(appointment.to_dict())
check_result_page(result.url)
print(result)