|
|
|
@ -3674,8 +3674,11 @@ if(DailyMotionParnerUploadPage = ""){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Status := NavigateFromBaseURLTo(DailyMotionParnerUploadPage,"Partner HQ - Dailymotion")
|
|
|
|
|
if(Status)
|
|
|
|
|
Return
|
|
|
|
|
if(Status){
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Message = Waiting for Page to Finish Fully Loading
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
|
|
@ -3765,9 +3768,6 @@ if(Status){
|
|
|
|
|
Message = Failed to Upload Thumbnail: Check Login Status
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
; Message = Inputting Video Details
|
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Inputting Title
|
|
|
|
@ -3784,7 +3784,6 @@ if(A_index = 5){
|
|
|
|
|
Return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = (//input[@placeholder='Enter text'])[1]
|
|
|
|
|
try, driver.FindElementByXPath(Xpath).click()
|
|
|
|
|
|
|
|
|
@ -3793,23 +3792,8 @@ try driver.executeScript(js)
|
|
|
|
|
|
|
|
|
|
Xpath = (//input[@placeholder='Enter text'])[1]
|
|
|
|
|
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.SPACE)
|
|
|
|
|
|
|
|
|
|
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.BackSpace)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Status := Selenium_LoopToSendValueByName(ElementName:="title",NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoTitle)
|
|
|
|
|
if(Status){
|
|
|
|
|
Message = Upload Failed: Check Login Status: Failed to Input Title
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
|
Return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
; get text in title box and see if it matches video title
|
|
|
|
|
js = return document.querySelector("input[placeholder='Enter text']").value;
|
|
|
|
|
try CurrentTitle := driver.executeScript(js)
|
|
|
|
@ -3819,9 +3803,6 @@ if(CurrentTitle != VideoTitle){
|
|
|
|
|
Message = Failed to input title on attempt %A_index%
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
sleep, 1000
|
|
|
|
|
; DevModeMsgBox("title doesn't match")
|
|
|
|
|
; msgbox, title doesn't match
|
|
|
|
|
; continue
|
|
|
|
|
}
|
|
|
|
|
else,
|
|
|
|
|
Break
|
|
|
|
@ -3903,6 +3884,7 @@ Loop, 3 {
|
|
|
|
|
if(A_index = 3){
|
|
|
|
|
Message = Failed to Select Education Category after %A_index% attempts
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
|
Return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3925,17 +3907,17 @@ Loop, 3 {
|
|
|
|
|
Message = Inputting Tags
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
; Append comma to end of tags
|
|
|
|
|
; DailyMotion page automtically splits the tags into their little boxes when they're seperated by commas
|
|
|
|
|
DailyMotionVideoTags := VideoTags . ","
|
|
|
|
|
|
|
|
|
|
; Msgbox % "VideoTags: " VideoTags
|
|
|
|
|
|
|
|
|
|
DailyMotionVideoTags := VideoTags . ",,"
|
|
|
|
|
Message = DailyMotion Video Tags: %DailyMotionVideoTags%
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
; DevModeMsgBox(DailyMotionVideoTags)
|
|
|
|
|
|
|
|
|
|
Xpath = //div[@class='ant-select-selection-search']//input[@role='combobox']
|
|
|
|
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=DailyMotionVideoTags)
|
|
|
|
|
; Msgbox % "Status: " Status
|
|
|
|
|
|
|
|
|
|
; double check the input
|
|
|
|
|
js = return document.querySelector("div[name='tags']").textContent;
|
|
|
|
|
try, inputTags := driver.executeScript(js)
|
|
|
|
|
Message = Tags that got input: %inputTags% (Will be doubled b/c of js)
|
|
|
|
@ -4109,7 +4091,7 @@ DailyMotionURL := StrReplace(ShareLink, "Share link: ","") ; remove the share li
|
|
|
|
|
Xpath = //button[@name='submit']
|
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
|
|
|
if(Status){
|
|
|
|
|
Message = Failed to click Publish button
|
|
|
|
|
Message = Video Uploaded but Failed to click Publish button
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
js = document.getElementsByClassName('ant-btn ant-btn-primary ant-btn-sm')[1].click();
|
|
|
|
@ -4117,7 +4099,6 @@ if(Status){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Upload Complete: %DailyMotionURL%
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
IniWrite, %DailyMotionURL%, %VideoLinksIniFile%, URLs, DailyMotionURL
|
|
|
|
|