|
|
|
@ -36,7 +36,7 @@ def generate_captions(file_path, title):
|
|
|
|
|
|
|
|
|
|
page.click("//span[contains(text(),'OK')]")
|
|
|
|
|
|
|
|
|
|
page.click("//span[contains(text(),'Sign in')]")
|
|
|
|
|
page.goto("https://www.capcut.com/login")
|
|
|
|
|
|
|
|
|
|
page.fill("//input[@class='lv-input lv-input-size-default lv_sign_in_panel_wide-input']", email)
|
|
|
|
|
|
|
|
|
@ -62,6 +62,7 @@ def generate_captions(file_path, title):
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
if page.is_visible("//div[@class='guide-modal-close-icon']"):
|
|
|
|
|
page.click("//div[@class='guide-modal-close-icon']")
|
|
|
|
|
|
|
|
|
|
if page.is_visible("//div[@data-selectable-item-id]"):
|
|
|
|
@ -84,17 +85,26 @@ def generate_captions(file_path, title):
|
|
|
|
|
|
|
|
|
|
page.goto("https://www.capcut.com/editor?enter_from=create_new¤t_page=landing_page&from_page=work_space&start_tab=video&__action_from=my_draft&position=my_draft&scenario=youtube_ads&scale=9%3A16")
|
|
|
|
|
|
|
|
|
|
if page.is_visible("//div[@class='guide-close-icon-f8J9FZ']//*[name()='svg']"):
|
|
|
|
|
page.click("//div[@class='guide-close-icon-f8J9FZ']//*[name()='svg']")
|
|
|
|
|
|
|
|
|
|
if page.is_visible("//div[@class='guide-placeholder-before-OsTdXF']"):
|
|
|
|
|
page.click("//div[@class='guide-placeholder-before-OsTdXF']")
|
|
|
|
|
|
|
|
|
|
if page.is_visible("//div[@class='guide-close-icon-f8J9FZ']//*[name()='svg']"):
|
|
|
|
|
page.click("//div[@class='guide-close-icon-f8J9FZ']//*[name()='svg']")
|
|
|
|
|
|
|
|
|
|
if page.is_visible("//div[@class='guide-close-icon-Gtxdju']//*[name()='svg']"):
|
|
|
|
|
page.click("//div[@class='guide-close-icon-Gtxdju']//*[name()='svg']")
|
|
|
|
|
|
|
|
|
|
if page.is_visible("//div[@class='guide-close-icon-Gtxdju']"):
|
|
|
|
|
page.click("//div[@class='guide-close-icon-Gtxdju']")
|
|
|
|
|
|
|
|
|
|
page.set_input_files("(//input[@type='file'])[1]", file_path)
|
|
|
|
|
|
|
|
|
|
time.sleep(2)
|
|
|
|
|
|
|
|
|
|
page.click("//div[@class='tools-ZGlCP0']")
|
|
|
|
|
page.click("//div[@class='tools-dCzTyg']")
|
|
|
|
|
page.click("(//li[@role='option'])[5]")
|
|
|
|
|
|
|
|
|
|
time.sleep(18)
|
|
|
|
@ -127,7 +137,7 @@ def generate_captions(file_path, title):
|
|
|
|
|
|
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
page.click(f"(//img[@class='image-DUnWNW'])[{str(settings.config['capcut']['preset_number'])}]")
|
|
|
|
|
page.click(f"(//img[@class='image-QII91y'])[{str(settings.config['capcut']['preset_number'])}]")
|
|
|
|
|
|
|
|
|
|
time.sleep(2)
|
|
|
|
|
|
|
|
|
|