added support for unchecking monetization checkbox in dailymotion

pull/2/head
Yuriy 10 months ago
parent ea91ebb237
commit 9f11fd5f00

@ -31,7 +31,7 @@ global FullScriptName
ScriptName = Freedomain Video Uploader ScriptName = Freedomain Video Uploader
ScriptVersion = 3.22 ScriptVersion = 3.23
FullScriptName := ScriptName . " - " . ScriptVersion FullScriptName := ScriptName . " - " . ScriptVersion
@ -959,6 +959,7 @@ Return
UpdateChrome: UpdateChrome:
if(CheckForChromeUpdates = "") if(CheckForChromeUpdates = "")
Status := CheckForChromeUpdates(ChromeFilepath) Status := CheckForChromeUpdates(ChromeFilepath)
@ -975,7 +976,9 @@ if(!status){
} }
DownloadLatestChromium() Status := DownloadLatestChromium()
if(Status)
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Dat
Return Return

@ -284,6 +284,25 @@ catch e {
} }
; Disable Monetization Checkbox
Message = Disabling Monetization Checkbox
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = //*[@id="advertising_instream_blocked"]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click on Monetization slider with xpath, trying with full xpath
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = /html/body/div/div[2]/div/div[3]/div/div/div[2]/div[2]/div/div/div/div[4]/div/button
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click on Monetization slider with full xpath, sleeping for 5 seconds so user can manually uncheck it.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
}
/* /*
; Disable monitization for video ; Disable monitization for video
SaveOrPostProgress(Message:="Unchecking monetizaton checkbox",PostType:="Tooltip,ErrorLoggingTextFile") SaveOrPostProgress(Message:="Unchecking monetizaton checkbox",PostType:="Tooltip,ErrorLoggingTextFile")

Loading…
Cancel
Save