From 9f11fd5f0065f2dd02a564f2d7281c683b87d64a Mon Sep 17 00:00:00 2001 From: Yuriy Date: Mon, 4 Dec 2023 21:16:11 -0500 Subject: [PATCH] added support for unchecking monetization checkbox in dailymotion --- Freedomain Video Uploader.ahk | 7 +++++-- Modules/DailyMotion-Upload.ahk | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Freedomain Video Uploader.ahk b/Freedomain Video Uploader.ahk index 2e3ff3d..7e9ddcf 100644 --- a/Freedomain Video Uploader.ahk +++ b/Freedomain Video Uploader.ahk @@ -31,7 +31,7 @@ global FullScriptName ScriptName = Freedomain Video Uploader -ScriptVersion = 3.22 +ScriptVersion = 3.23 FullScriptName := ScriptName . " - " . ScriptVersion @@ -959,6 +959,7 @@ Return UpdateChrome: + if(CheckForChromeUpdates = "") Status := CheckForChromeUpdates(ChromeFilepath) @@ -975,7 +976,9 @@ if(!status){ } - DownloadLatestChromium() + Status := DownloadLatestChromium() + if(Status) + GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Dat Return diff --git a/Modules/DailyMotion-Upload.ahk b/Modules/DailyMotion-Upload.ahk index 9d5aad7..0c681f6 100644 --- a/Modules/DailyMotion-Upload.ahk +++ b/Modules/DailyMotion-Upload.ahk @@ -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 SaveOrPostProgress(Message:="Unchecking monetizaton checkbox",PostType:="Tooltip,ErrorLoggingTextFile")