add requirements.txt
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user