diff --git a/Modules/Brighteon-Upload.ahk b/Modules/Brighteon-Upload.ahk index 18c3cbd..95d6c86 100644 --- a/Modules/Brighteon-Upload.ahk +++ b/Modules/Brighteon-Upload.ahk @@ -202,7 +202,7 @@ Loop, 10 { SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") ; SaveOrPostProgress(Message:=Message,PostType:="DiscordErrorLogging") - Xpath = //div[@class='e-content e-lib e-keyboard'] + Xpath = //div[@id='richtexteditor_747903514_0_rte-edit-view'] ; generated using SelectorHub, using the exclude id tag option. Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoDescription) if(Status){ SaveOrPostProgress(Message:="Failed to input Video Description",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") @@ -302,7 +302,7 @@ Loop, %Number_of_loops_to_Check_Upload_status% { sleep, %Time_Between_Loops_Upload_Status% ; Get progress status through javascript - jsCheck = return document.getElementsByClassName('video-upload--details')[0].textContent; + jsCheck = return document.querySelector("#UploadDetails").textContent; try ProgressStatus := driver.executeScript(jsCheck) if(ProgressStatus = ""){ @@ -332,7 +332,7 @@ Loop, %Number_of_loops_to_Check_Upload_status% { ; "Save Now" button -js = return document.querySelector("button[class='mr-2 btn btn-primary btn-sm']").textContent; +js = return document.querySelector("#Submit").textContent; try, status := driver.executeScript(js) if(!InStr(status, "Save Video")){ Message = Save Video Button is not clickable. Please check page for errors. @@ -345,6 +345,11 @@ if(!InStr(status, "Save Video")){ ; Save Video button TooltipThis("Clicking Save Video Button to finalize Upload") try BrighteonUploadPageURL := driver.url + +js = document.querySelector("#Submit").click(); +driver.executeScript(js) + +; wait for page to finish loading try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding @@ -372,7 +377,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") sleep, 2000 ; Navigate to Videos page to make sure it's refreshed with latest video -try driver.Get("https://www.brighteon.com/dashboard/videos") ;Open selected URL +try driver.Get("https://www.brighteon.com/dashboard?page=1") ;Open selected URL try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding sleep, 2000