Updated Brighteon module to reflect website changes

main
Yuriy 4 days ago
parent b1a7fb3326
commit 2ed71756d0

@ -202,7 +202,7 @@ Loop, 10 {
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; SaveOrPostProgress(Message:=Message,PostType:="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) Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoDescription)
if(Status){ if(Status){
SaveOrPostProgress(Message:="Failed to input Video Description",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") 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% sleep, %Time_Between_Loops_Upload_Status%
; Get progress status through javascript ; 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) try ProgressStatus := driver.executeScript(jsCheck)
if(ProgressStatus = ""){ if(ProgressStatus = ""){
@ -332,7 +332,7 @@ Loop, %Number_of_loops_to_Check_Upload_status% {
; "Save Now" button ; "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) try, status := driver.executeScript(js)
if(!InStr(status, "Save Video")){ if(!InStr(status, "Save Video")){
Message = Save Video Button is not clickable. Please check page for errors. Message = Save Video Button is not clickable. Please check page for errors.
@ -345,6 +345,11 @@ if(!InStr(status, "Save Video")){
; Save Video button ; Save Video button
TooltipThis("Clicking Save Video Button to finalize Upload") TooltipThis("Clicking Save Video Button to finalize Upload")
try BrighteonUploadPageURL := driver.url 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 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 sleep, 2000
; Navigate to Videos page to make sure it's refreshed with latest video ; 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 try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
sleep, 2000 sleep, 2000

Loading…
Cancel
Save