Fixed Bitchute video link broken by string replace, removed no longer relevant odysee thumbnail Selenium upload code, added extra error logging to discord, added extra check to Tab Switching function
This commit is contained in:
@@ -931,7 +931,6 @@ UpdateScript:
|
|||||||
UpdateScript()
|
UpdateScript()
|
||||||
|
|
||||||
; @todo: Save any changes made to the script before installing update
|
; @todo: Save any changes made to the script before installing update
|
||||||
; Changelog := FindUpdateChangeLog(ScriptUpdateFilepath)
|
|
||||||
Return
|
Return
|
||||||
|
|
||||||
; now defunt, safe to remove
|
; now defunt, safe to remove
|
||||||
@@ -1215,15 +1214,17 @@ KeywordsArray := StrSplit(VideoTags,",")
|
|||||||
Gosub, LBRYGetURL
|
Gosub, LBRYGetURL
|
||||||
}
|
}
|
||||||
|
|
||||||
if(OdyseeVideoThumb){
|
/* if(OdyseeVideoThumb){
|
||||||
OdyseeUploadType := "Video"
|
OdyseeUploadType := "Video"
|
||||||
Gosub, OdyseeVideoThumbUpload
|
Gosub, OdyseeVideoThumbUpload
|
||||||
}
|
}
|
||||||
|
|
||||||
if(OdyseeAudioThumb){
|
*/
|
||||||
|
/* if(OdyseeAudioThumb){
|
||||||
OdyseeUploadType := "Audio"
|
OdyseeUploadType := "Audio"
|
||||||
Gosub, OdyseeAudioThumbUpload
|
Gosub, OdyseeAudioThumbUpload
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if(LocalsGrabURL OR LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
if(LocalsGrabURL OR LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
||||||
Gosub, LocalsGrabURL
|
Gosub, LocalsGrabURL
|
||||||
@@ -1489,38 +1490,40 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
; msgbox %SocialMediaPosterFilepath%
|
; msgbox %SocialMediaPosterFilepath%
|
||||||
run, %SocialMediaPosterFilepath% "%VideoLinksIniFile%"
|
run, %SocialMediaPosterFilepath% "%VideoLinksIniFile%"
|
||||||
Return
|
Return
|
||||||
; Podcast Upload
|
|
||||||
;------------------------------------------------
|
|
||||||
|
|
||||||
UploadPodcast:
|
/*
|
||||||
CurrentSite := "Podcast"
|
*/
|
||||||
PodcastTags := StrReplace(PodcastTags, " ,", ",")
|
|
||||||
PodcastTags := StrReplace(PodcastTags, ", ", ",")
|
; -------------------------------Podcast-------------------------------
|
||||||
PodcastTags := StrReplace(PodcastTags, " ", "-")
|
UploadPodcast:
|
||||||
PodcastTags := StrReplace(PodcastTags, "--", "-")
|
CurrentSite := "Podcast"
|
||||||
PodcastTags := StrReplace(PodcastTags, "--", "-")
|
PodcastTags := StrReplace(PodcastTags, " ,", ",")
|
||||||
; Msgbox % "PodcastTags: " PodcastTags
|
PodcastTags := StrReplace(PodcastTags, ", ", ",")
|
||||||
|
PodcastTags := StrReplace(PodcastTags, " ", "-")
|
||||||
|
PodcastTags := StrReplace(PodcastTags, "--", "-")
|
||||||
|
PodcastTags := StrReplace(PodcastTags, "--", "-")
|
||||||
|
; Msgbox % "PodcastTags: " PodcastTags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IniRead, FDRRadioURL, %SettingsIniFilepath%, General, FDRRadioURL, %A_Space%
|
IniRead, FDRRadioURL, %SettingsIniFilepath%, General, FDRRadioURL, %A_Space%
|
||||||
if(FDRRadioURL = ""){
|
if(FDRRadioURL = ""){
|
||||||
Message = FDRRadioURL is blank.`nPlease add URL to Settings.ini file under:`n`n[General]`nFDRRadioURL=
|
Message = FDRRadioURL is blank.`nPlease add URL to Settings.ini file under:`n`n[General]`nFDRRadioURL=
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
MsgBox 0x10,, %Message%
|
MsgBox 0x10,, %Message%
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
IniRead, Username, %SettingsIniFilepath%, General, FDRRadioUN, %A_Space%
|
IniRead, Username, %SettingsIniFilepath%, General, FDRRadioUN, %A_Space%
|
||||||
IniRead, Password, %SettingsIniFilepath%, General, FDRRadioPW, %A_Space%
|
IniRead, Password, %SettingsIniFilepath%, General, FDRRadioPW, %A_Space%
|
||||||
|
|
||||||
if(Username = "" or Password = ""){
|
if(Username = "" or Password = ""){
|
||||||
Message = Username and/or Password are blank.`nPlease add Login to Settings.ini file under:`n`n[General]`nFDRRadioUN=`nFDRRadioPW=
|
Message = Username and/or Password are blank.`nPlease add Login to Settings.ini file under:`n`n[General]`nFDRRadioUN=`nFDRRadioPW=
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(MP3AudioFilepath = ""){
|
if(MP3AudioFilepath = ""){
|
||||||
MsgBox 0x33, Unable to Upload Podcast, No MP3 File Was Found/Selected. `nWould you like to select one now?
|
MsgBox 0x33, Unable to Upload Podcast, No MP3 File Was Found/Selected. `nWould you like to select one now?
|
||||||
|
|
||||||
IfMsgBox Yes, {
|
IfMsgBox Yes, {
|
||||||
@@ -1533,72 +1536,77 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
Sublime Indentation Reset
|
||||||
|
*/
|
||||||
|
|
||||||
if(!InStr(MP3AudioFilepath, ".mp3")){
|
if(!InStr(MP3AudioFilepath, ".mp3")){
|
||||||
|
|
||||||
Message = Unable to upload podcast, no mp3 file was selected.
|
Message = Unable to upload podcast, no mp3 file was selected.
|
||||||
MsgBox 0x40, Error, %Message%
|
MsgBox 0x40, Error, %Message%
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Message = Grabbing MP3 file data
|
; Message = Grabbing MP3 file data
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
; https://www.autohotkey.com/boards/viewtopic.php?t=59882
|
; https://www.autohotkey.com/boards/viewtopic.php?t=59882
|
||||||
Message = Calculating MP3 File Size and Length
|
Message = Calculating MP3 File Size and Length
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile, DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile, DiscordErrorLogging")
|
||||||
|
|
||||||
Obj := Filexpro(MP3AudioFilepath,,
|
Obj := Filexpro(MP3AudioFilepath,,
|
||||||
, "Length"
|
, "Length"
|
||||||
, "Size" )
|
, "Size" )
|
||||||
MP3AudioFilesize := obj["Size"]
|
MP3AudioFilesize := obj["Size"]
|
||||||
MP3AudioLength := obj["Length"]
|
MP3AudioLength := obj["Length"]
|
||||||
; MsgBox % obj["Size"]
|
; MsgBox % obj["Size"]
|
||||||
|
|
||||||
AudioLengthArray := StrSplit(MP3AudioLength,":")
|
AudioLengthArray := StrSplit(MP3AudioLength,":")
|
||||||
|
|
||||||
Message = MP3 Audio Length: %MP3AudioLength%
|
Message = MP3 Audio Length: %MP3AudioLength%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
AudioLength_Seconds := ((AudioLengthArray[1] * 60 ) * 60) + (AudioLengthArray[2] * 60) + AudioLengthArray[3]
|
AudioLength_Seconds := ((AudioLengthArray[1] * 60 ) * 60) + (AudioLengthArray[2] * 60) + AudioLengthArray[3]
|
||||||
Message = MP3 Audio Length in Seconds: %TotalTimeInSeconds%
|
Message = MP3 Audio Length in Seconds: %TotalTimeInSeconds%
|
||||||
|
SaveOrPostProgress(Message:="Message",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
; AudioLength_Hours := AudioLengthArray[1]
|
; AudioLength_Hours := AudioLengthArray[1]
|
||||||
; AudioLength_Minutes := AudioLengthArray[2]
|
; AudioLength_Minutes := AudioLengthArray[2]
|
||||||
; AudioLength_Seconds := AudioLengthArray[3]
|
; AudioLength_Seconds := AudioLengthArray[3]
|
||||||
; AudioLength_SecondsOriginal := AudioLength_Seconds
|
; AudioLength_SecondsOriginal := AudioLength_Seconds
|
||||||
; AudioLength_Seconds := (AudioLength_Minutes * 60) + ((AudioLength_Hours * 60) * 60) + AudioLength_Seconds
|
; AudioLength_Seconds := (AudioLength_Minutes * 60) + ((AudioLength_Hours * 60) * 60) + AudioLength_Seconds
|
||||||
|
|
||||||
; Msgbox % "AudioLength_Hours: " AudioLength_Hours
|
; Msgbox % "AudioLength_Hours: " AudioLength_Hours
|
||||||
; Msgbox % "AudioLength_Minutes: " AudioLength_Minutes
|
; Msgbox % "AudioLength_Minutes: " AudioLength_Minutes
|
||||||
; Msgbox % "AudioLength_Seconds: " AudioLength_Seconds
|
; Msgbox % "AudioLength_Seconds: " AudioLength_Seconds
|
||||||
; Msgbox % "AudioLength_SecondsOriginal: " AudioLength_SecondsOriginal
|
; Msgbox % "AudioLength_SecondsOriginal: " AudioLength_SecondsOriginal
|
||||||
|
|
||||||
FileGetSize, OutputVar, %MP3AudioFilepath%, K ; Retrieve the size in Kbytes.
|
FileGetSize, OutputVar, %MP3AudioFilepath%, K ; Retrieve the size in Kbytes.
|
||||||
FIlesizeInBytes := OutputVar * 1024
|
FIlesizeInBytes := OutputVar * 1024
|
||||||
|
|
||||||
|
|
||||||
Message = Inputting Podcast Information
|
Message = Inputting Podcast Information
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
|
Status := NavigateFromBaseURLTo(FDRRadioURL)
|
||||||
|
if(Status)
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
Status := NavigateFromBaseURLTo(FDRRadioURL)
|
Status := CheckForAlerts()
|
||||||
if(Status){
|
if(Status){
|
||||||
Message = Upload Failed (E#7295)`nUnable to Navigate to Upload Page`nChrome was closed or Internet down possibly?
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
Message = Logging in
|
}
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
|
|
||||||
Xpath = //input[@id='email']
|
Message = Logging in
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Username)
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
if(!Status){ ; if inputting email did NOT fail, then we are on the login page, input the password and then click login.
|
|
||||||
|
Xpath = //input[@id='email']
|
||||||
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Username)
|
||||||
|
if(!Status){ ; if inputting email did NOT fail, then we are on the login page, input the password and then click login.
|
||||||
Xpath = //input[@id='password']
|
Xpath = //input[@id='password']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Password)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Password)
|
||||||
|
|
||||||
@@ -1615,123 +1623,119 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Message = Waiting for Page to Load
|
Message = Waiting for Page to Load
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
Xpath = //input[@id='num']
|
Xpath = //input[@id='num']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=60,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=60,SleepLength:=1000)
|
||||||
if(Status){
|
if(Status){
|
||||||
Message = New Podcast Page did not load after 60 seconds. Check Login Status
|
Message = New Podcast Page did not load after 60 seconds. Check Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
Message = Inputting Podcast Info
|
Message = Inputting Podcast Info
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
; Click the "Is Active?" Checkbox
|
; Click the "Is Active?" Checkbox
|
||||||
Xpath = //input[@id='isActive']
|
Xpath = //input[@id='isActive']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
; Input Podcast Number
|
; Input Podcast Number
|
||||||
Xpath = //input[@id='num']
|
Xpath = //input[@id='num']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PodcastNumber)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PodcastNumber)
|
||||||
|
|
||||||
; Input Podcast Title
|
; Input Podcast Title
|
||||||
Xpath = //input[@id='title']
|
Xpath = //input[@id='title']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoTitle)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoTitle)
|
||||||
|
|
||||||
; INput Audio URL
|
; INput Audio URL
|
||||||
Xpath = //input[@id='url-audio']
|
Xpath = //input[@id='url-audio']
|
||||||
SplitPath, MP3AudioFilepath, MP3AudioNameWithExt
|
SplitPath, MP3AudioFilepath, MP3AudioNameWithExt
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=MP3AudioNameWithExt)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=MP3AudioNameWithExt)
|
||||||
|
|
||||||
; INput thumbnail URL
|
; INput thumbnail URL
|
||||||
Xpath = //input[@id='url-thumbnail']
|
Xpath = //input[@id='url-thumbnail']
|
||||||
SplitPath, VideoThumbFilepath, VideoThumbnailFilenameWithExt
|
SplitPath, VideoThumbFilepath, VideoThumbnailFilenameWithExt
|
||||||
ThumbnailURL = https://cdn.freedomainradio.com/%VideoThumbnailFilenameWithExt%
|
ThumbnailURL = https://cdn.freedomainradio.com/%VideoThumbnailFilenameWithExt%
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=ThumbnailURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=ThumbnailURL)
|
||||||
|
|
||||||
; Input BitChute URL
|
; Input BitChute URL
|
||||||
Xpath = //input[@id='url-bitchute']
|
Xpath = //input[@id='url-bitchute']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitChuteURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitChuteURL)
|
||||||
|
|
||||||
; Input Brighteon URL
|
; Input Brighteon URL
|
||||||
Xpath = //input[@id='url-brighteon']
|
Xpath = //input[@id='url-brighteon']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BrighteonURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BrighteonURL)
|
||||||
|
|
||||||
; Input DailyMotion URL
|
; Input DailyMotion URL
|
||||||
Xpath = //input[@id='url-dailymotion']
|
Xpath = //input[@id='url-dailymotion']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=DailyMotionURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=DailyMotionURL)
|
||||||
|
|
||||||
; Input LBRY URL
|
; Input LBRY URL
|
||||||
Xpath = //input[@id='url-lbry']
|
Xpath = //input[@id='url-lbry']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=OdyseeVideoURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=OdyseeVideoURL)
|
||||||
|
|
||||||
; Input LBRY URL
|
; Input LBRY URL
|
||||||
Xpath = //input[@id='url-locals']
|
Xpath = //input[@id='url-locals']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsURL)
|
||||||
|
|
||||||
; Input Rumble URL
|
; Input Rumble URL
|
||||||
Xpath = //input[@id='url-rumble']
|
Xpath = //input[@id='url-rumble']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=RumbleURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=RumbleURL)
|
||||||
|
|
||||||
|
|
||||||
; Soundcloud but actually LBRY Audio URL
|
; Soundcloud but actually LBRY Audio URL
|
||||||
Xpath = //input[@id='url-lbry-audio']
|
Xpath = //input[@id='url-lbry-audio']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=OdyseeAudioURL)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=OdyseeAudioURL)
|
||||||
|
|
||||||
|
|
||||||
; INput filesize
|
; INput filesize
|
||||||
Xpath = //input[@id='fileSize']
|
Xpath = //input[@id='fileSize']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=FIlesizeInBytes)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=FIlesizeInBytes)
|
||||||
|
|
||||||
; Msgbox % "FIlesizeInBytes2: " FIlesiz
|
|
||||||
|
|
||||||
; ToolTip
|
|
||||||
|
|
||||||
|
|
||||||
Xpath = //input[@id='lengthHours']
|
Xpath = //input[@id='lengthHours']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=AudioLength_Hours)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=AudioLength_Hours)
|
||||||
|
|
||||||
Xpath = //input[@id='lengthMinutes']
|
Xpath = //input[@id='lengthMinutes']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=AudioLength_Minutes)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=AudioLength_Minutes)
|
||||||
|
|
||||||
Xpath = //input[@id='lengthSeconds']
|
Xpath = //input[@id='lengthSeconds']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=AudioLength_Seconds)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=AudioLength_Seconds)
|
||||||
; Message = Audio Length in Seconds that got input: %AudioLength_Seconds%
|
; Message = Audio Length in Seconds that got input: %AudioLength_Seconds%
|
||||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
Message = Inputting Description
|
Message = Inputting Description
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
Xpath = //textarea[@id='description']
|
Xpath = //textarea[@id='description']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
; Input Description
|
; Input Description
|
||||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
|
|
||||||
js = document.getElementById('description').value = "%JSVideoDescription%";
|
js = document.getElementById('description').value = "%JSVideoDescription%";
|
||||||
try driver.executeScript(js) ;Executes a Javascript on the webpage, mostly used for buttons.
|
try driver.executeScript(js) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||||
|
|
||||||
|
|
||||||
Message = Inputting Tags
|
Message = Inputting Tags
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
Podcasttags := StrReplace(Podcasttags, " , ", ",")
|
Podcasttags := StrReplace(Podcasttags, " , ", ",")
|
||||||
Podcasttags := StrReplace(Podcasttags, " ,", ",")
|
Podcasttags := StrReplace(Podcasttags, " ,", ",")
|
||||||
Podcasttags := StrReplace(Podcasttags, ", ", ",")
|
Podcasttags := StrReplace(Podcasttags, ", ", ",")
|
||||||
|
|
||||||
ArrayOfPodcastTags := StrSplit(Podcasttags,",")
|
ArrayOfPodcastTags := StrSplit(Podcasttags,",")
|
||||||
LengthOfArrayOfPodcastTags := ArrayOfPodcastTags.Length() ; Save total number of items in the array
|
LengthOfArrayOfPodcastTags := ArrayOfPodcastTags.Length() ; Save total number of items in the array
|
||||||
|
|
||||||
try pagehtml := driver.pagesource
|
try pagehtml := driver.pagesource
|
||||||
; Msgbox % "pagehtml: " pagehtml
|
; Msgbox % "pagehtml: " pagehtml
|
||||||
Loop, %LengthOfArrayOfPodcastTags% {
|
Loop, %LengthOfArrayOfPodcastTags% {
|
||||||
Tag := ArrayOfPodcastTags[A_Index] ; find value from position in array
|
Tag := ArrayOfPodcastTags[A_Index] ; find value from position in array
|
||||||
|
|
||||||
SpanID = title">%Tag%</span></div></li><li><div id="_easyui_tree_
|
SpanID = title">%Tag%</span></div></li><li><div id="_easyui_tree_
|
||||||
@@ -1780,18 +1784,12 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
break ; otherwise break out of the loop
|
break ; otherwise break out of the loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
; Message = Podcast Upload Complete
|
|
||||||
; msgbox,4096, Done., Input Done.`n`nPlease confirm input and click the final "Save" button.
|
|
||||||
|
|
||||||
; ToolTip,
|
|
||||||
/*
|
/*
|
||||||
OnMessage(0x44, "OnMsgBoxPodcastFinish")
|
Sublime Indentation Reset
|
||||||
MsgBox 0x40, Finished!, Input Complete!`n`nPlease confirm input and click the final "Save" button on the page.
|
|
||||||
OnMessage(0x44, "")
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Message = Input Complete! `nPlease Confirm and click Final "Save" Button on Podcast Page
|
Message = Input Complete! `nPlease Confirm and click Final "Save" Button on Podcast Page
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
@@ -2267,7 +2265,7 @@ if(!InStr(LocalsPostPageURL, "/share/post")){
|
|||||||
|
|
||||||
|
|
||||||
Status := NavigateFromBaseURLTo(LocalsPostPageURL)
|
Status := NavigateFromBaseURLTo(LocalsPostPageURL)
|
||||||
if(Status = "Failed")
|
if(Status)
|
||||||
Return
|
Return
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2926,13 +2924,8 @@ Loop, %Number_of_loops_to_Check_Upload_status% {
|
|||||||
|
|
||||||
|
|
||||||
Status := NavigateFromBaseURLTo("https://www.bitchute.com/myupload", "BitChute Video Uploader")
|
Status := NavigateFromBaseURLTo("https://www.bitchute.com/myupload", "BitChute Video Uploader")
|
||||||
if(Status){
|
if(Status)
|
||||||
Message = Upload Failed (E#7295)`nUnable to Navigate to Upload Page`nChrome was closed or Internet down possibly?
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
Return
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Message = Checking Login Status
|
Message = Checking Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
@@ -3179,7 +3172,7 @@ Loop, %Number_of_loops_to_Check_Upload_status% {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BitChuteURL := "https://www.bitchute.com/" . VideoHref
|
BitChuteURL := "https://www.bitchute.com/" . VideoHref
|
||||||
BitChuteURL := StrReplace(BitchuteURL, "//video", "/")
|
BitChuteURL := StrReplace(BitchuteURL, "//video", "/video")
|
||||||
|
|
||||||
; navigate to video page
|
; navigate to video page
|
||||||
try driver.Get(BitChuteURL) ;Open selected URL
|
try driver.Get(BitChuteURL) ;Open selected URL
|
||||||
@@ -3227,15 +3220,9 @@ Loop, %Number_of_loops_to_Check_Upload_status% {
|
|||||||
|
|
||||||
CurrentSite := "Brighteon"
|
CurrentSite := "Brighteon"
|
||||||
SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
URLAttempt := NavigateFromBaseURLTo("https://www.brighteon.com/dashboard/video-upload")
|
Status := NavigateFromBaseURLTo("https://www.brighteon.com/dashboard/video-upload")
|
||||||
if(URLAttempt = "Failed"){
|
if(Status)
|
||||||
Message = Failed to Navigate to Upload Page
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
Return
|
||||||
}
|
|
||||||
|
|
||||||
; try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSBrighteonVideoDescription := FormatTextToJSText(VideoDescription)
|
JSBrighteonVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
@@ -3674,11 +3661,8 @@ if(DailyMotionParnerUploadPage = ""){
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status := NavigateFromBaseURLTo(DailyMotionParnerUploadPage,"Partner HQ - Dailymotion")
|
Status := NavigateFromBaseURLTo(DailyMotionParnerUploadPage,"Partner HQ - Dailymotion")
|
||||||
if(Status){
|
if(Status)
|
||||||
SaveDriverURLOFErrorPage()
|
Return
|
||||||
Return
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Message = Waiting for Page to Finish Fully Loading
|
Message = Waiting for Page to Finish Fully Loading
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||||
@@ -3825,7 +3809,7 @@ DailyMotionDescription := VideoDescription
|
|||||||
|
|
||||||
DailyMotionJSDescription := FormatTextToJSText(DailyMotionDescription)
|
DailyMotionJSDescription := FormatTextToJSText(DailyMotionDescription)
|
||||||
|
|
||||||
Message = DailyMotionJSDescription String Length := StrLen(DailyMotionJSDescription)
|
Message := "DailyMotionJSDescription String Length: " . StrLen(DailyMotionJSDescription)
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
@@ -3911,7 +3895,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
|||||||
; DailyMotion page automtically splits the tags into their little boxes when they're seperated by commas
|
; DailyMotion page automtically splits the tags into their little boxes when they're seperated by commas
|
||||||
DailyMotionVideoTags := VideoTags . ","
|
DailyMotionVideoTags := VideoTags . ","
|
||||||
|
|
||||||
Message = DailyMotion Video Tags: %DailyMotionVideoTags%
|
Message = Video Tags: %DailyMotionVideoTags%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
Xpath = //div[@class='ant-select-selection-search']//input[@role='combobox']
|
Xpath = //div[@class='ant-select-selection-search']//input[@role='combobox']
|
||||||
@@ -4468,341 +4452,26 @@ Return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------LBRY Thumb---Odysee Thumb-----------------------
|
; -------------------------------Rumble-------------------------------
|
||||||
OdyseeVideoThumbUpload:
|
RumbleUpload:
|
||||||
OdyseeAudioThumbUpload:
|
CurrentSite := "Rumble"
|
||||||
|
SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
Status := NavigateFromBaseURLTo("https://rumble.com/upload.php")
|
||||||
if(VideoThumbFilepath = "") {
|
|
||||||
Message = Thumbnail Upload Skipped. Thumbnail Filepath not provided
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(OdyseeUploadType = "Audio"){
|
|
||||||
OdyseeURLToUploadThumbnailFor := OdyseeAudioURL
|
|
||||||
CurrentSite := "Odysee Audio"
|
|
||||||
|
|
||||||
}
|
|
||||||
if(OdyseeUploadType = "Video"){
|
|
||||||
OdyseeURLToUploadThumbnailFor := OdyseeVideoURL
|
|
||||||
CurrentSite := "Odysee Video"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
if(OdyseeUploadType = "Audio" AND OdyseeAudioURL = "")
|
|
||||||
{
|
|
||||||
Message = Audio Thumbnail Upload Skipped. OdyseeAudioURL is blank.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
if(OdyseeUploadType = "Video" AND OdyseeVideoURL = "")
|
|
||||||
{
|
|
||||||
Message = Video Thumbnail Upload Skipped. OdyseeVideoURL is blank.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
; Msgbox % "LBRYAudioURL: " LBRYAudioURL
|
|
||||||
; Msgbox % "LBRYUploadType: " LBRYUploadType
|
|
||||||
|
|
||||||
|
|
||||||
; Msgbox % "OdyseeURLToUploadThumbnailFor: " OdyseeURLToUploadThumbnailFor
|
|
||||||
|
|
||||||
/*Message = Uploading %OdyseeUploadType% Thumbnail through Odysee. `nNavigating to: %OdyseeURLToUploadThumbnailFor%
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
*/
|
|
||||||
Message = Uploading Thumbnail through Odysee
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
/*try driver.ExecuteScript("window.open();") ;Opens a new Window or tab (Depends on your Chrome Prefs)
|
|
||||||
catch e {
|
|
||||||
Message = Failed to Open New Window
|
|
||||||
}
|
|
||||||
|
|
||||||
try driver.SwitchToNextWindow
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
URLAttempt := NavigateFromBaseURLTo(OdyseeURLToUploadThumbnailFor)
|
|
||||||
if(URLAttempt = "Failed"){
|
|
||||||
Message =Unable to Navigate to Video Page (E#2816)`nInternet Connectivity issue or LBRY link not properly grabbed from API`nPlease upload Thumbnail manually at your earliest convenience.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
|
||||||
|
|
||||||
TooltipThis("Waiting 10 Seconds for Video Page to Fully Load")
|
|
||||||
sleep, 10000
|
|
||||||
|
|
||||||
|
|
||||||
/*; Check login status
|
|
||||||
Message = Checking Login Status
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
try LoginStatus := driver.findelementbyxpath(Xpath).Attribute("innerText") ; Grabb innertext
|
|
||||||
|
|
||||||
if(!LoginStatus){
|
|
||||||
Message = Upload Failed (E#3985)`nLogin Cookies have expired. Please Re-login
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
Message = Checking Login Status
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
||||||
try html := driver.pagesource ; save page's entire HTML to a variable
|
|
||||||
if(!InStr(HTML, "Edit</span>")){
|
|
||||||
Message = Upload Failed: Unable to Find Edit Button: Check Login Status
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Message = Clicking "Edit" on PageURL %OdyseeURLToUploadThumbnailFor%
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="DiscordErrorLogging")
|
|
||||||
|
|
||||||
; Click Edit button to check if logged in or not.
|
|
||||||
Xpath = //span[contains(text(),'Edit')]
|
|
||||||
loop, 3 {
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=5000)
|
|
||||||
if(Status){
|
|
||||||
; msgbox, click failed
|
|
||||||
Sleep, 60000
|
|
||||||
try driver.executeScript("history.go(0)") ;refresh page
|
|
||||||
}
|
|
||||||
else,
|
|
||||||
Break
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Status){
|
|
||||||
try CurrentPage := driver.url
|
|
||||||
Message = Unable to click "Edit" button. Most likely Reason is Video is Still Confirming OR Login Cookies Have Expired.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
; Close the video preview floating window
|
|
||||||
Xpath = //button[@title='Close']
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
; "Use thumbnail upload tool"
|
|
||||||
TooltipThis("Selecting Thumbnail Upload Tool")
|
|
||||||
Xpath = //span[contains(text(),'Use thumbnail upload tool')]
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Thumbnail Upload Failed (E#5617)`nUnable to click on "Use thumbnail upload tool"
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
try CurrentPage := driver.url
|
|
||||||
Message = Trying to Click Browse for Thumbnail Button on Page: %CurrentPage%
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
Xpath = /html/body/div/div/div[1]/main/div/div/section[2]/div/div/fieldset-section/input-submit/button/span/span
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Failed to Click "Browse" button with Direct Xpath to input thumbnail filepath. Trying with Relative
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*; Select Use Thumbnail upload tool button
|
|
||||||
Xpath = //span[contains(text(),'Use thumbnail upload tool')]
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Failed to click "Use Thumbanil Upload Tool"
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
Xpath = //div[@class='card__main-actions']//div//span[@class='button__label'][normalize-space()='Browse']
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Failed to click "Browse" button using relative and direct Xpath
|
|
||||||
|
|
||||||
Xpath = //div[@class='card__main-actions']//div//button[@aria-label='Browse']
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Failed to click "Browse" button using Relative Xpath of parent element as well
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Message = Trying to select thumbnail to upload
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
Status := InputFilePathIntoOpenWindow(VideoThumbFilepath)
|
|
||||||
if(Status)
|
if(Status)
|
||||||
{
|
Return
|
||||||
Message = Upload Failed:`nUnable to Find "Open File" window to input filepath into
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
Xpath = //input[@accept='.png, .jpg, .jpeg, .gif']
|
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoThumbFilepath)
|
|
||||||
if(Status){
|
|
||||||
Message = Failed to Upload Thumbnail Image
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
; Return
|
|
||||||
}
|
|
||||||
; try driver.FindElementByXPath(Xpath).SendKeys(VideoThumbFilepath)
|
|
||||||
|
|
||||||
|
|
||||||
; "Upload thumbnail" popup
|
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||||
; Confirmation Upload Popup - popup box
|
|
||||||
Xpath = //span[contains(text(),'Upload')]
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Thumbnail Upload Failed (E#2866)`nUnable to click upload confirmation button
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
Xpath = /html/body/div[4]/div/div/div/button[1]/span/span
|
|
||||||
loop, 15 {
|
|
||||||
if(A_index = 15){
|
|
||||||
Message = Thumbnail Upload Failed (E#2866)`nUnable to click upload confirmation button
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Break
|
|
||||||
}
|
|
||||||
try driver.FindElementByXPath(Xpath).click() ;click on confirmaiton button
|
|
||||||
catch e {
|
|
||||||
Sleep, 1000
|
|
||||||
Continue
|
|
||||||
}
|
|
||||||
Break
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
/*; "Upload Complete" Text
|
|
||||||
Xpath = /html/body/div/div/div[1]/main/div/div/section[2]/div/div/div/div[2]/p
|
|
||||||
Loop, 15 {
|
|
||||||
if(A_index = 15){
|
|
||||||
Message = Thumbnail Upload Failed (E#5580)`nUnable to find upload confirmation text on page.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Break
|
|
||||||
}
|
|
||||||
try UploadStatus := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
|
|
||||||
if(!InStr(UploadStatus, "Complete"))
|
|
||||||
{
|
|
||||||
sleep, 2000
|
|
||||||
Continue
|
|
||||||
}
|
|
||||||
Break
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
; sleep, 5000 ; sleep 5 seconds for everything to catch up.
|
|
||||||
|
|
||||||
Message = Waiting for Thumbnail to Finish Uploading
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 5000
|
|
||||||
|
|
||||||
; Hit the save button
|
|
||||||
Xpath = //button[@class='button button--primary'] ; Save button popup
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=5000)
|
|
||||||
if(Status = Failed){
|
|
||||||
/* Message = Failed to click last "Save" button. Please click it to finalize the upload.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
sleep, 5000
|
|
||||||
|
|
||||||
; Click off the confirmation popup and Check the "Skip Preview and Confirmation" checkbox
|
|
||||||
; xpath = //label[normalize-space()='Skip preview and confirmation']
|
|
||||||
; try SkipPreviewCheck := driver.findelementbyxpath(Xpath).Attribute("innerText") ; Grabb innertext
|
|
||||||
|
|
||||||
; if(SkipPreviewCheck != ""){
|
|
||||||
; Check skip preview checkbox so the box doesn't pop up again
|
|
||||||
|
|
||||||
TooltipThis("Checking for Confirmation Popup")
|
|
||||||
xpath = //label[normalize-space()='Skip preview and confirmation']
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
|
||||||
|
|
||||||
Message = Unchecked "Confirm Edit" on each video Checkbox
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
; msgbox ?
|
|
||||||
|
|
||||||
; Save Button
|
|
||||||
Xpath = //button[@aria-label='Save']
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=1000)
|
|
||||||
; }
|
|
||||||
|
|
||||||
|
|
||||||
Message = Thumbnail Uploaded Successfully
|
Message = Checking Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
if(OdyseeUploadType = "Video")
|
CheckForAlerts()
|
||||||
IniWrite, Successful, %VideoLinksIniFile%, Misc, OdyseeVideoThumb
|
|
||||||
if(OdyseeUploadType = "Audio")
|
|
||||||
IniWrite, Successful, %VideoLinksIniFile%, Misc, OdyseeAudioThumb
|
|
||||||
|
|
||||||
; TakeScreenshotOfPage(ScreenShotSavePath)
|
try CurrentURL := driver.URL
|
||||||
|
if(InStr(CurrentURL, "/login.php")){
|
||||||
Return
|
|
||||||
|
|
||||||
|
|
||||||
; ---------------------/LBRY Thumb--------/Odysee Thumb-----------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------Rumble-------------------------------
|
|
||||||
RumbleUpload:
|
|
||||||
CurrentSite := "Rumble"
|
|
||||||
SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
URLAttempt := NavigateFromBaseURLTo("https://rumble.com/upload.php")
|
|
||||||
if(URLAttempt)
|
|
||||||
Return
|
|
||||||
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
|
||||||
|
|
||||||
|
|
||||||
Message = Checking Login Status
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
CheckForAlerts()
|
|
||||||
|
|
||||||
try CurrentURL := driver.URL
|
|
||||||
if(InStr(CurrentURL, "/login.php")){
|
|
||||||
|
|
||||||
|
|
||||||
; AutoLogin := 1
|
; AutoLogin := 1
|
||||||
@@ -4850,34 +4519,34 @@ sleep, 5000
|
|||||||
Message = Waiting 5 seconds for page to fully load
|
Message = Waiting 5 seconds for page to fully load
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
sleep, 5000
|
sleep, 5000
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckForAlerts()
|
CheckForAlerts()
|
||||||
|
|
||||||
Message = Uploading Video File
|
Message = Uploading Video File
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
Xpath = //input[@id='Filedata']
|
Xpath = //input[@id='Filedata']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoFilepath)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoFilepath)
|
||||||
if(Status){
|
if(Status){
|
||||||
Message = Failed to Upload Video File
|
Message = Failed to Upload Video File
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
SaveDriverURLOFErrorPage()
|
SaveDriverURLOFErrorPage()
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
; Input Title
|
; Input Title
|
||||||
try driver.findElementsByName("title").item[1].SendKeys(VideoTitle) ;selects element based on Name and sends variable to it.
|
try driver.findElementsByName("title").item[1].SendKeys(VideoTitle) ;selects element based on Name and sends variable to it.
|
||||||
catch e {
|
catch e {
|
||||||
Message = Video Upload Failed, Please Check Login Status
|
Message = Video Upload Failed, Please Check Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
SaveDriverURLOFErrorPage()
|
SaveDriverURLOFErrorPage()
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
; Input Description
|
; Input Description
|
||||||
Loop, 5 { ; Attempt to input video description a couple of times
|
Loop, 5 { ; Attempt to input video description a couple of times
|
||||||
TooltipThis("Inputting Description `nAttempt Number: " A_index)
|
TooltipThis("Inputting Description `nAttempt Number: " A_index)
|
||||||
|
|
||||||
status := js_SendAndCheckWithID(Element:="description",ValueToCheck:="value",SleepLength:=3000,JSStringText:=JSVideoDescription)
|
status := js_SendAndCheckWithID(Element:="description",ValueToCheck:="value",SleepLength:=3000,JSStringText:=JSVideoDescription)
|
||||||
@@ -5116,9 +4785,11 @@ Return
|
|||||||
FacebookUpload:
|
FacebookUpload:
|
||||||
CurrentSite := "Facebook"
|
CurrentSite := "Facebook"
|
||||||
SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
URLAttempt := NavigateFromBaseURLTo("https://www.facebook.com/")
|
Status := NavigateFromBaseURLTo("https://www.facebook.com/")
|
||||||
if(URLAttempt)
|
if(Status)
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user