5 Commits
1.0 ... 1.2

Author SHA1 Message Date
4bd4e1f7c3 rumble functionality, bug fixes, gui improvements 2024-05-08 13:58:37 -04:00
aae8820e37 odysee support, locals small bug fix, gui rework 2024-05-03 12:54:50 -04:00
Yuriy
4a7e4658b2 GUI Additions 2024-05-01 15:39:55 -04:00
Yuriy
a2ecaa50fa fixed time selector 2024-05-01 14:35:17 -04:00
Yuriy
f988efb221 migrated templates folder to its own directory 2024-05-01 14:23:23 -04:00
13 changed files with 809 additions and 38 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,5 @@
Freedomain Livestream Scheduler.exe
Lib/Templates-FLS/
Settings.ini Settings.ini
VideoLinks.ini VideoLinks.ini
body.txt body.txt
@@ -20,3 +22,4 @@ Freedomain Video Uploader.exe
Lib/LBRY Process Killer.exe Lib/LBRY Process Killer.exe
Lib/chrome-win64 Lib/chrome-win64
Lib/Version.ini Lib/Version.ini

BIN
Assets/Icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
Assets/Icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
Assets/Icon.xcf Normal file

Binary file not shown.

84
Compile AHK to EXE.ahk Normal file
View File

@@ -0,0 +1,84 @@
;---ENVIRONMENT---------------------------------------------------------------------
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn ; Enable warnings to assist with detecting common errors.
;DetectHiddenWindows, On
#SingleInstance, Force
DetectHiddenWindows, ON
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;SetKeyDelay, 500
CoordMode, ToolTip, Screen
CoordMode, Mouse, Screen
; #NoTrayIcon
; Menu, Tray, Icon, RMScriptManager.ico
;---Notes/Extra Info/#Includes------------------------------------------------------
;---VARIABLES-----------------------------------------------------------------------
ScriptName = Freedomain Livestream Scheduler
AHKFilepath = %A_ScriptDir%\%ScriptName%.ahk
Exefilepath = %A_ScriptDir%\%ScriptName%.exe
icopath = %A_ScriptDir%\Assets\Icon.ico
VersionIniFP = %A_ScriptDir%\Version.ini
;---MAIN SCRIPT---------------------------------------------------------------------
; Bump the version number in the version.ini file
IniRead, VersionNumber, %VersionIniFP%, %ScriptName%, Version, 0.0 ; , Filename, Section, Key [, Default]
VersionNumber += .01
VersionNumber := SubStr(VersionNumber, 1, 4)
IniWrite, %VersionNumber%, %VersionIniFP%,%ScriptName%, Version
; Kill any active intances of the uploaders so the .exe file can be overwriten by the compilation
process, close, %ScriptName%.exe
sleep, 1000
; Delete the .exe file so it can be repalced
if(FileExist(Exefilepath)){
FileDelete, %Exefilepath%
if(ErrorLevel){
msgbox, failed to delete Exe file. Please delete manually and re-run the compiler.
ExitApp
}
}
if(!FileExist(AHKFilepath)){
msgbox, %AHKFilepath% does not exist`nExiting
ExitApp
}
if(!FileExist(icopath)){
msgbox, %icopath% does not exist`nExiting
ExitApp
}
run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%""
; OldNotify(ScriptToCompile,"Compiled Successfully",5)
; sleep, 5000
ExitApp
;---FUNCTIONS-----------------------------------------------------------------------

View File

@@ -49,6 +49,7 @@ CheckIfUpdateInstalled(PassedInArgument)
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk #include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\URLDownloadToVar.ahk #include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\URLDownloadToVar.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Miscellaneous-Functions.ahk #Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Miscellaneous-Functions.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\LBRY-Functions.ahk
@@ -163,23 +164,23 @@ ButtonHeights := 30
ThumbnailPreviewWidth := 200 ThumbnailPreviewWidth := 200
GuiHeight := 450 GuiHeight := 550
; Column One ; Column One
ColumnOneWidth := 400 ColumnOneWidth := 500
ColumnOneEditBoxWidth := ColumnOneWidth - (MarginSize * 2) ColumnOneEditBoxWidth := ColumnOneWidth - (MarginSize * 2)
GuiFontSize = 10 GuiFontSize = 15
; Column Two ; Column Two
ColumnTwoXPosition := ColumnOneWidth + (MarginSize * 2) ColumnTwoXPosition := ColumnOneWidth + (MarginSize * 2)
ColumnTwoEditBoxWidth := 200 ColumnTwoEditBoxWidth := 200
ColumnTwoEditBoxHalfWidth := ColumnTwoEditBoxWidth / 2
; Results Screen ; Results Screen
ResultButtonWidth := 150 ResultButtonWidth := 250
ResultButtonEditWidth := 250 ResultButtonEditWidth := 250
ResultButtonHeights := 30 ResultButtonHeights := 30
@@ -204,7 +205,7 @@ Gui, Font, Normal
Gui, Add, Edit,w%ColumnOneEditBoxWidth% h150 vLivestreamDescription, %LivestreamDescription% Gui, Add, Edit,w%ColumnOneEditBoxWidth% h150 vLivestreamDescription, %LivestreamDescription%
Gui, Font, Bold Gui, Font, Bold
Gui, Add, Text,, Tags Gui, Add, Text,, Tags (Comma Seperated)
Gui, Font, Normal Gui, Font, Normal
Gui, Add, Edit,w%ColumnOneEditBoxWidth% vLivestreamTags, %LivestreamTags% Gui, Add, Edit,w%ColumnOneEditBoxWidth% vLivestreamTags, %LivestreamTags%
@@ -229,32 +230,43 @@ Gui, Font, Bold
; Gui, Add, Text, , Settings ; Gui, Add, Text, , Settings
Gui, Add, Text,y0 x%ColumnTwoXPosition%, Settings Gui, Add, Text,y0 x%ColumnTwoXPosition%, Settings
Gui, Font, Normal Gui, Font, Normal
Gui, Font, s8
Gui, Add, Checkbox, vConfirmBeforeSubmit checked, Confirm Before Submit Gui, Add, Checkbox, vConfirmBeforeSubmit checked, Confirm Before Submit
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, Font, Bold Gui, Font, Bold
; Gui, Add, Text, , Settings ; Gui, Add, Text, , Settings
Gui, Add, Text, y+%MarginSizeDoubled%, Date and Time of Livestream Gui, Add, Text, y+%MarginSizeDoubled% , Date and Time
Gui, Font, Normal Gui, Font, Normal
Gui, Add, DateTime, vLivestreamDate w%ColumnTwoEditBoxWidth%, MM/dd/yyyy Gui, Add, DateTime, vLivestreamDate w%ColumnTwoEditBoxWidth%, MM/dd/yyyy
Gui, Add, DateTime, vLivestreamTime w%ColumnTwoEditBoxWidth%, HH:mm Gui, Add, DateTime, vLivestreamTime w%ColumnTwoEditBoxWidth% Choose200505311900, Time
Gui, Font, s8
Gui, Font, Normal
Gui, Add, Button, gSetLivestreamTimeMorning yp+35 w%ColumnTwoEditBoxHalfWidth%,Morning
Gui, Add, Button,yp+0 x+0 gSetLivestreamTimeMorning w%ColumnTwoEditBoxHalfWidth%,Evening
Gui, Font, s%GuiFontSize%
Gui, Font, Bold Gui, Font, Bold
Gui, Add, Text,y+%MarginSizeDoubled%, Platform to Schedule On Gui, Add, Text,y+%MarginSizeDoubled% x%ColumnTwoXPosition%, Platforms
Gui, Font, Normal Gui, Font, Normal
; Gui, Add, Checkbox,, Dlive ; Gui, Add, Checkbox,, Dlive
Gui, Add, Checkbox, checked vLocals, Locals
; Gui, Add, Checkbox,checked vOdysee, Odysee
Gui, Add, Checkbox, vOdysee, Odysee
Gui, Add, Checkbox, vLocals, Locals
Gui, Add, Checkbox,checked vRumble, Rumble
Gui, Font, Bold Gui, Font, Bold
Gui, Add, Button,gSchedulePost w%ColumnTwoEditBoxWidth% y+100 gSaveAsTemplate, Save as Template Gui, Add, Button,gSchedulePost w%ColumnTwoEditBoxWidth% gSaveAsTemplate y+50, Save as Template
Gui, Add, Button,gSchedulePost w%ColumnTwoEditBoxWidth% gLoadTemplate, Load Template Gui, Add, Button,gSchedulePost w%ColumnTwoEditBoxWidth% gLoadTemplate, Load Template
Gui, Font, s15 Gui, Font, s15
Gui, Add, Button,gSchedulePost w%ColumnTwoEditBoxWidth% h40 y+50, Schedule Gui, Add, Button,gSchedulePost w%ColumnTwoEditBoxWidth% h40, Schedule
Gui, Font, Normal Gui, Font, Normal
Gui, Show, h%GuiHeight% Gui, Show, h%GuiHeight%
@@ -262,6 +274,14 @@ Return
SetLivestreamTimeMorning:
if(A_GuiControl = "Morning")
GuiControl, , LivestreamTime, 200505311100
if(A_GuiControl = "Evening")
GuiControl, , LivestreamTime, 200505311900
Return
@@ -272,7 +292,7 @@ Return
SaveAsTemplate: SaveAsTemplate:
Gui, submit, NoHide ; Update variables for all modified fields Gui, submit, NoHide ; Update variables for all modified fields
TemplateDirectory = %A_ScriptDir%\Lib\Templates TemplateDirectory = %A_ScriptDir%\Lib\Templates-%ScriptAbbreviatedName%
if(!FileExist(TemplateDirectory)){ if(!FileExist(TemplateDirectory)){
FileCreateDir, %TemplateDirectory% FileCreateDir, %TemplateDirectory%
} }
@@ -281,7 +301,7 @@ InputBox, TemplateName, Input Name, Please Input Name for the Template:
if(ErrorLevel) if(ErrorLevel)
Return Return
TemplateDirectory = %A_ScriptDir%\Lib\Templates\%TemplateName% TemplateDirectory = %TemplateDirectory%\%TemplateName%
ErrorLoggingDirectory := TemplateDirectory ErrorLoggingDirectory := TemplateDirectory
; FileCreateDir, %TemplateDirectory% ; FileCreateDir, %TemplateDirectory%
CreateErrorLoggingFiles(ErrorLoggingDirectory) CreateErrorLoggingFiles(ErrorLoggingDirectory)
@@ -304,7 +324,7 @@ LoadTemplate:
Message = Loading Template Message = Loading Template
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,DiscordErrorLogging")
ErrorLoggingDirectory = %A_ScriptDir%\Lib\Templates\ ErrorLoggingDirectory = %A_ScriptDir%\Lib\Templates-%ScriptAbbreviatedName%\
FileSelectFolder, ErrorLoggingDirectory, %ErrorLoggingDirectory% FileSelectFolder, ErrorLoggingDirectory, %ErrorLoggingDirectory%
if(ErrorLevel){ if(ErrorLevel){
Tooltip Tooltip
@@ -329,6 +349,8 @@ Return
SchedulePost: SchedulePost:
Gui, submit, NoHide Gui, submit, NoHide
; Re-use an existing errorlog or create new directory ; Re-use an existing errorlog or create new directory
if(InStr(PassedInArgument, "\ErrorLogging\")) if(InStr(PassedInArgument, "\ErrorLogging\"))
CreateErrorLoggingFiles(PassedInArgument) CreateErrorLoggingFiles(PassedInArgument)
@@ -361,10 +383,16 @@ if(Locals){
Gosub, LocalsSchedule Gosub, LocalsSchedule
} }
if(Rumble)
gosub, RumbleSchedule
; msgbox, done! ; msgbox, done!
; Gui, Add, ; Gui, Add,
ToolTip ; hide any existing tooltips
Gui, Destroy Gui, Destroy
@@ -373,26 +401,45 @@ Gui, Destroy
; ------------------------------------------------
; RESULTS SCREEN
; ------------------------------------------------
; Results Screen
; Read Info From .ini Files
; ------------------------------------------------ ; ------------------------------------------------
IniRead, LocalsRTMPURL, %PostStatusesFilepath%, Livestream,LocalsRTMPURL, %A_Space% IniRead, LocalsRTMPURL, %PostStatusesFilepath%, Livestream,LocalsRTMPURL, %A_Space%
IniRead, LocalsRTMPKey, %PostStatusesFilepath%, Livestream,LocalsRTMPKey, %A_Space% IniRead, LocalsRTMPKey, %PostStatusesFilepath%, Livestream,LocalsRTMPKey, %A_Space%
IniRead, LocalsLivestreamURL, %PostStatusesFilepath%, Livestream,LocalsLivestreamURL, %A_Space%
; IniRead, OutputVar, Filename, Section, Key [, Default] IniRead, OdyseeLivestreamURL, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL, %A_Space%
IniRead, RumbleLivestreamURL, %PostStatusesFilepath%, Livestream,RumbleLivestreamURL, %A_Space%
Gui, Font, Bold Gui, Font, Bold
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, Add, Button, x10 y+10 h%ResultButtonHeights% w%ResultButtonWidth%, Locals RTMP Key
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsRTMPKey center, %LocalsRTMPKey%
Gui, Add, Button, x10 y+10 h%ResultButtonHeights% w%ResultButtonWidth%, Locals RTMP URL Gui, Add, Button,x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals RTMP URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsRTMPURL center, %LocalsRTMPURL% Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsRTMPURL center, %LocalsRTMPURL%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals RTMP Key
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsRTMPKey center, %LocalsRTMPKey%
Gui, Add, Button, gRetryUpload,Try Failed Again Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsLivestreamURL center, %LocalsLivestreamURL%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Odysee URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vOdyseeLivestreamURL center, %OdyseeLivestreamURL%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Rumble URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vRumbleLivestreamURL center, %RumbleLivestreamURL%
Gui, Add, Button, x%MarginSize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Copy Title
Gui, Add, Button, x+%marginsize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Copy Description
Gui, Add, Button, x%MarginSize% h%ResultButtonHeights% w%ResultButtonEditWidth%,
Gui, Add, Button, x+%marginsize% gRetryUpload h%ResultButtonHeights% w%ResultButtonEditWidth%,Try Failed Again
; Gui, Add, Button, x%MarginSize% gRetryUpload h%ResultButtonHeights% w%ResultButtonEditWidth%,Try Failed Again
Gui, Show Gui, Show
@@ -402,6 +449,44 @@ Return
; GoSubs ; GoSubs
; ------------------------------------------------ ; ------------------------------------------------
ResultsGUIAction:
; Msgbox % "A_GuiControl: " A_GuiControl
Message = Copying %A_GuiControl% to Clipboard
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
if(A_GuiControl = "Copy Title"){
Clipboard := LivestreamTitle
}
if(A_GuiControl = "Copy Description"){
Clipboard := LivestreamDescription
}
if(A_GuiControl = "Rumble URL"){
Clipboard := RumbleLivestreamURL
}
if(A_GuiControl = "Odysee URL"){
Clipboard := OdyseeLivestreamURL
}
if(A_GuiControl = "Locals URL"){
Clipboard := LocalsLivestreamURL
}
if(A_GuiControl = "Locals RTMP URL"){
Clipboard := LocalsRTMPURL
}
if(A_GuiControl = "Locals RTMP Key"){
Clipboard := LocalsRTMPKey
}
sleep, 1000
ToolTip
Return
KillScript: KillScript:
ExitApp ExitApp
@@ -415,11 +500,12 @@ Return
; GoSubs for Selenium Automation
; ------------------------------------------------
#Include %A_ScriptDir%\Modules\Locals-Schedule.ahk #Include %A_ScriptDir%\Modules\Locals-Schedule.ahk
#Include %A_ScriptDir%\Modules\Odysee-Schedule.ahk #Include %A_ScriptDir%\Modules\Odysee-Schedule.ahk
#Include %A_ScriptDir%\Modules\Odysee-Grab-URL.ahk
#Include %A_ScriptDir%\Modules\Rumble-Schedule.ahk
; Misc ; Misc

View File

@@ -7,8 +7,8 @@ Try, PageURL := driver.Url
if(InStr(PageURL, "/register")) if(InStr(PageURL, "/register"))
{ {
LoginPageURL := LocalsPostPageURL . "/login" LoginPageURL := LocalsPostPageURL . "/login"
Message = Website Login Expired. Trying to log back in. Navigating to: %LoginPageURL% Message = Website Login Expired. Please log back in and then try again.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
try, driver.Get(LoginPageURL) ;Open selected URL try, driver.Get(LoginPageURL) ;Open selected URL
Return
} }

View File

@@ -37,6 +37,12 @@ Xpath = //input[@id='title']
; try, driver.FindElementByXPath(Xpath).SendKeys("TEST STRINGHERE") ; try, driver.FindElementByXPath(Xpath).SendKeys("TEST STRINGHERE")
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamTitle) Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamTitle)
if(Status){
Message = Failed to input Livestream Title
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Xpath = //textarea[@id='body'] Xpath = //textarea[@id='body']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamDescription) Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamDescription)
@@ -50,7 +56,7 @@ Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000
; Create a Livestream - Second Screen ; Create a Livestream - Second Screen
; ------------------------------------------------ ; ------------------------------------------------
; check if "Schedule Livestream" checkbox is checked, check it if not ; check if "Schedule Livestream" checkbox is checked, check it if not
LivestreamScheduledCheckbox := driver.findElementByID("is_scheduled_livestream").isSelected() ;Checks if a checkbox is ticked or not and saves it to a variable, usually: 0 = Unchecked, -1 = Checked try, LivestreamScheduledCheckbox := driver.findElementByID("is_scheduled_livestream").isSelected() ;Checks if a checkbox is ticked or not and saves it to a variable, usually: 0 = Unchecked, -1 = Checked
if(LivestreamScheduledCheckbox = 0){ if(LivestreamScheduledCheckbox = 0){
Xpath = //label[normalize-space()='Schedule this live stream?'] Xpath = //label[normalize-space()='Schedule this live stream?']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
@@ -63,12 +69,12 @@ if(LivestreamScheduledCheckbox = 0){
} }
; Make sure the "Notify Users" checkbox is checked ; Make sure the "Notify Users" checkbox is checked
NotifyUsersCheckbox := driver.findElementByID("is_do_promo").isSelected() ;Checks if a checkbox is ticked or not and saves it to a variable, usually: 0 = Unchecked, -1 = Checked try, NotifyUsersCheckbox := driver.findElementByID("is_do_promo").isSelected() ;Checks if a checkbox is ticked or not and saves it to a variable, usually: 0 = Unchecked, -1 = Checked
if(NotifyUsersCheckbox = 0){ if(NotifyUsersCheckbox = 0){
Xpath = //label[@for='is_do_promo'] Xpath = //label[@for='is_do_promo']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
NotifyUsersCheckbox := driver.findElementByID("is_do_promo").isSelected() try, NotifyUsersCheckbox := driver.findElementByID("is_do_promo").isSelected()
if(NotifyUsersCheckbox = 0){ if(NotifyUsersCheckbox = 0){
Message = Failed to select the "Notify Users" checkbox Message = Failed to select the "Notify Users" checkbox
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
@@ -90,9 +96,21 @@ try, driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.BackSpace).SendKeys(d
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsLivestreamTime) Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsLivestreamTime)
if(ConfirmBeforeSubmit) if(ConfirmBeforeSubmit){
msgbox, Please check that all data was input correctly and then click OK to Finalize Schedule and grab RTMP Settings OnMessage(0x44, "OnMsgBoxUserConfirmation")
MsgBox 0x21, User Confirmation, Please check that all data was input correctly and fix any mistakes and then click PROCEED to finalize the Upload.`n`nClick STOP to cancel the rest of this Upload and move on to the next website.
OnMessage(0x44, "")
IfMsgBox OK, {
} Else IfMsgBox Cancel, {
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
/*
*/
; click schedule button ; click schedule button
Xpath = //span[normalize-space()='Schedule'] Xpath = //span[normalize-space()='Schedule']
@@ -160,9 +178,11 @@ Xpath = //div[@class='modal-wrapper modal-wrapper_stream']//div[5]
LocalsRTMPKey := GetHTMLValueFromXpathOuterHTML(XPATH, "value") LocalsRTMPKey := GetHTMLValueFromXpathOuterHTML(XPATH, "value")
ToolTip
; Msgbox % "PostStatusesFilepath: " PostStatusesFilepath
IniWrite, %LocalsRTMPURL%, %PostStatusesFilepath%, Livestream,LocalsRTMPURL IniWrite, %LocalsRTMPURL%, %PostStatusesFilepath%, Livestream,LocalsRTMPURL
IniWrite, %LocalsRTMPKey%, %PostStatusesFilepath%, Livestream,LocalsRTMPKey IniWrite, %LocalsRTMPKey%, %PostStatusesFilepath%, Livestream,LocalsRTMPKey
IniWrite, %LivestreamURL%, %PostStatusesFilepath%, Livestream,LivestreamURL
ToolTip
Return Return

154
Modules/Odysee-Grab-URL.ahk Normal file
View File

@@ -0,0 +1,154 @@
OdyseeGrabURL:
Iniread, OdyseeURLSLUG, %PostStatusesFilepath%, Livestream,OdyseeURLSLUG, %A_Space%
if(OdyseeURLSLUG = ""){
Message = OdyseeURLSLug is empty in the Livestream.ini file.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Status := NavigateFromBaseURLTo("https://odysee.com/$/livestream")
if(Status)
Return
; click on Local Setup button to switch windows
Xpath = //span[contains(text(),'Local Setup')]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
Xpath = //label[normalize-space()='Stream server']
try, Status := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(!Status){
Message = Failed to switch to "Stream Server" page
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
/*
Message = Waiting for Livestream Created Confirmation Popup
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = //h2[normalize-space()='Livestream Created']
Loop, 60 {
try, Status := ElementInnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(Status = "Livestream Created")
break
else, {
sleep, 1000
Continue
}
}
*/
Message = Grabbing Livestream URL from Livestream Settings Page
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
/*
; Grab and Format the livestream URL
Xpath = //li[@role='link']
Loop, 60 {
URLSLUG := GetHTMLValueFromXpathOuterHTML(XPATH, "href")
if(URLSLug = "Failed"){
Message = Failed to Grab URL SLug from confirmation popup
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Msgbox % "URLSLug: " URLSLug
if(InStr(URLSLug, OdyseeLivestreamSlug))
break
if(A_Index = 60){
Message = Odysee did not generate permanant livestream URL after 1 minute of waiting. Congestion Issues?
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
sleep, 1000
}
*/
/*; Message =
Xpath = //span[contains(text(),'View Livestream Settings')]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
if(Status){
Message = Failed to click on View Livestream Settigns Button
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Double check that we're on the right page.
Xpath = //label[normalize-space()='Stream server']
try InnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(InnerText != "Stream server"){
Message = Failed to Navigate to View Livestream Settings Page
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
*/
Message = Waiting for Livestream to get confirmed and URL to be generated`nWill Give up after 5 minutes
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = //div[@class='section']//li[1]
Loop, 100 {
if(A_Index = 100){
Message = Failed to grab URL after 5 minutes of waiting.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Try ElementOuterHTML := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
if(!InStr(ElementOuterHTML, OdyseeURLSLUG)){
Sleep, 5000
Continue
; Message = Failed to Grab Livestream URL. Please copy and paste it manually.
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
; return
}
else, {
break
}
}
; Clipboard := OdyseeURLSLUG
; Msgbox % "OdyseeURLSLUG: " OdyseeURLSLUG
; Clipboard := ElementOuterHTML
; Msgbox % "ElementOuterHTML: " ElementOuterHTML
Xpath = //div[@class='section']//li[1]
URLSLUG := GetHTMLValueFromXpathOuterHTML(XPATH, "href")
if(URLSLUG = "Failed"){
Message = Failed to Grab Livestream URL from outerHTML of livestream element.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
OdyseeLivestreamURL := "https://odysee.com" . URLSLug
; Msgbox % "OdyseeLivestreamURL: " OdyseeLivestreamURL
; Message = URL Slug Grabbed from Confirmation Popup: %URLSLug%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; OdyseeLivestreamURL := "https://odysee.com" . URLSLug
IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL

View File

@@ -20,14 +20,229 @@ if(InStr(PageURL, "/signup")){
Return Return
} }
; If clear button exists, click it and clear any data from a previous attempt
Xpath = //span[contains(text(),'Clear')]
try, Status := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(InStr(Status, "Clear")){
Message = Clearing out previous unfinished upload
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; we need to wipe out the previously unfinished upload
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
if(Status){
Message = Failed to clear out previous upload
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
; create a slug string and format it
FormatTime, OdyseeLivestreamDate , %LivestreamDate%, MM-dd-yyyy ; _hhmmss
OdyseeLivestreamSlug := "livestream-" . OdyseeLivestreamDate
OdyseeURLSLUG := LBRYCMDTextReplacement(OdyseeLivestreamSlug)
IniWrite, %OdyseeURLSLUG%, %PostStatusesFilepath%, Livestream,OdyseeURLSLUG
Xpath = (//div[@class='form-field__prefix'])[1]
try OdyseeChannelURL := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
Message = Inputting Livestream Information
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = //input[@placeholder='Descriptive titles work best']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamTitle)
if(Status){
Message = Failed to Input Livestream Title
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Xpath = //input[@name='content_name']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=OdyseeURLSLUG)
if(Status){
Message = Failed to Input Livestream URL
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Xpath = //textarea[@id='content_description']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamDescription)
if(Status){
Message = Failed to Input Livestream Description
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Click "Scheduled Time" checkbox
Message = Selecting -Scheduled Time- checkbox
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = //label[normalize-space()='Scheduled Time']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=5000)
if(Status){
Message = Failed to click the "Scheduled Time" checkbox
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Create variables with time and date of timestream
FormatTime, LivestreamYear , %LivestreamDate%, yyyy ; _hhmmss
FormatTime, LivestreamMonth , %LivestreamDate%, MM ; _hhmmss
FormatTime, LivestreamDay , %LivestreamDate%, dd ; _hhmmss
FormatTime, LivestreamHour , %LivestreamTime%, h ; _hhmmss
FormatTime, LivestreamMinute , %LivestreamTime%, m ; _hhmmss
FormatTime, LivestreamAMPM , %LivestreamTime%, tt ; _hhmmss
; Input Livestream Time and Date
Xpath = //input[@placeholder='----']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamYear)
Xpath = //input[@name='month']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamMonth, ClearElement:=1)
Xpath = //input[@name='day']
Status := Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:=LivestreamDay, ClearElement:=1)
Xpath = //input[@name='hour12']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamHour, ClearElement:=1)
Xpath = //input[@name='minute']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamMinute, ClearElement:=1)
Xpath = //select[@name='amPm']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamAMPM)
if(LivestreamThumbnail != ""){
; Upload Thumbnail
Xpath = //input[@accept='.png, .jpg, .jpeg, .gif, .webp']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamThumbnail)
if(Status){
Message = Failed to Upload Thumbnail
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
; check for the Upload Thumbnail Confirmation popup
Xpath = //h1[normalize-space()='Upload thumbnail']
loop, 10 {
if(A_index = 10){
Message = Upload Thumbnail Confirmation did not appear after 10 seconds.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
try, Status := driver.findelementbyxpath(Xpath).Attribute("innerText")
if(Status = "Upload Thumbnail"){
break
}
else, {
sleep, 1000
Continue
}
}
try, Status := driver.findelementbyxpath(Xpath).Attribute("innerText")
if(Status = "Upload Thumbnail"){
; click confirm upload button
Xpath = //div[@class='card__actions']//button[@aria-label='Upload']//span[@class='button__content']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
}
else, {
Message = Upload Failed: Upload thumbnail confirmation popup did not show up.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
/* ; check if the "Are you sure you want to upload this thumbnail to odysee.com?" popup exists
; Xpath = /html/body/div[4]/div/div/label
; try Status := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(Status){ ; if element exists, then click the confirm button
Xpath = //div[@class='card__actions']//button[@aria-label='Upload']//span[@class='button__content']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
; MsgBox,,Element innerText: `n, % driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
}
else, {
Message = Upload thumbnail confirmation popup did not show up.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
*/
Xpath = //div[@class='column__item thumbnail-picker__preview']
; Get element with Thumbnail and check if image upload was successful
Try, Status := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
if(!InStr(Status, "thumbs.odycdn.com")){
Message = Thumbnail Upload Failed
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
} else, {
Message = Video Upload Failed. Odysee Requires a thumbnail for video uploads.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
LivestreamTagsArray := StrSplit(LivestreamTags, ",")
Loop % LivestreamTagsArray.Length(){
; ArrayItem := ARRAY[A_Index]
Tag := LivestreamTagsArray[A_Index]
Xpath = //input[@placeholder='gaming, crypto']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Tag)
sleep, 500
driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.ENTER)
sleep, 500
; Odysee accepts max of 5 tags
if(A_Index = 5)
break
}
if(ConfirmBeforeSubmit){
OnMessage(0x44, "OnMsgBoxUserConfirmation")
MsgBox 0x21, User Confirmation, Please check that all data was input correctly and fix any mistakes and then click PROCEED to finalize the Upload.`n`nClick STOP to cancel the rest of this Upload and move on to the next website.
OnMessage(0x44, "")
IfMsgBox OK, {
} Else IfMsgBox Cancel, {
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
/*
*/
Message = Submitting Livestream
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; Click Create Button in the confirmation popup
Xpath = //span[contains(text(),'Create')]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
; Click confirm button in the popup
Xpath = //button[@aria-label='Confirm']//span[@class='button__content']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
OdyseeLivestreamURL := "https://" . OdyseeChannelURL . OdyseeURLSLUG
; OdyseeURL := "https://" . OdyseeURL
IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL
Return Return

View File

@@ -1,5 +1,5 @@
RumbleUpload: RumbleSchedule:
;------------------------------------------------ ;------------------------------------------------
CurrentSite := "Rumble" CurrentSite := "Rumble"
@@ -38,6 +38,215 @@ if(InStr(CurrentURL, "/sso/auth/consent")){
; Schedule New Stream
; ------------------------------------------------
Message = Scheduling new stream and inputting information
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
; Schedule new stream
; Schedule a stream button
Xpath = //div[normalize-space()='Schedule a stream']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
Xpath = (//h2[normalize-space()='Select a template (optional)'])
try ElementInnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(!ElementInnerText){
Message = Templates Subwindow did not show up
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Return
}
loop, 3 {
Xpath = (//div[@class='flex items-center justify-between gap-x-8 p-4 bg-indigo rounded-xl'])[%A_Index%]
try, ElementText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
; use the template with "Freedomain Livestream in the name"
if(InStr(ElementText, "Freedomain Livestream")){
Xpath = (//span[contains(text(),'Select')])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to Select Livestream Template
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
}
; input thumbnail
if(Livestreamthumbnail){
Xpath = //input[@id='room-thumbnail']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Livestreamthumbnail)
if(Status){
Message = Faied to upload custom thubmanil
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
; input Livestream Title
Xpath = //input[@placeholder='Give your stream a name']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamTitle, ClearElement:=1)
; input Livestream Description
Xpath = //textarea[@placeholder='Tell the audience more about your stream']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LivestreamDescription, ClearElement:=1)
; Input Date & Time
; ------------------------------------------------
; Create variables with time and date of timestream
FormatTime, RumbleLivestreamDate , %LivestreamDate%, dddd, MMMM
FormatTime, LivestreamOrdinalDay , %LivestreamDate%, d
FormatTime, RumbleLivestreamYear , %LivestreamDate%, yyyy
LivestreamOrdinalDay := GetDateOrdinalSuffix(LivestreamOrdinalDay)
; Msgbox % "LivestreamOrdinalDay: " LivestreamOrdinalDay
RumbleLivestreamDate := RumbleLivestreamDate . " " . LivestreamOrdinalDay . ", " . RumbleLivestreamYear
; Msgbox % "RumbleLivestreamDate: " RumbleLivestreamDate
; Msgbox % "RumbleLivestreamDate: " RumbleLivestreamDate
FormatTime, RumbleLivestreamTime , %LivestreamTime%, h:mm tt
; Msgbox % "RumbleLivestreamTime: " RumbleLivestreamTime
; FormatTime, RumbleLivestreamYear , %LivestreamDate%, yyyy
; click on box to open time picker dialogue
Xpath = //input[@placeholder='Pick a time']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
; generate xpath based on date and click element
Xpath = //div[@aria-label='Choose %RumbleLivestreamDate%']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to select date from popup menu using generated xpath.`nXpath = %Xpath%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; generate xpath based on time and click element
Xpath = //li[normalize-space()='%RumbleLivestreamTime%']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to select time from popup menu using generated xpath.`nXpath = %Xpath%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Select Channel for Upload
; ------------------------------------------------
; click channel dropdown
Xpath = //span[@class='text-light truncate text-mini']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click on Channel dropdown menu
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Grab inner text of all items in the channel select drop down menu
xpath = (//div[@class='shadow-md rounded-lg overflow-x-hidden bg-indigo'])[1]
try ElementInnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
; pull out name of first channel in dropdown
FirstChannelName := StrSplit(ElementInnerText, "`n")[1]
Xpath = (//span[normalize-space()='%FirstChannelName%'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to select the channel -%FirstChannelName%- from Channel dropdown menu
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
return
}
; Select each Secondary Platform checkbox
; ------------------------------------------------
Loop, 10 {
IndexPlusOne := A_index + 1
Xpath = (//div[@class='flex shrink-0 items-center gap-x-4'])[%A_index%]
XpathCheckbox = (//div[@class='relative shrink-0'])[%IndexPlusOne%]
try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(SecondaryPlatformCheckboxName = "Add new destination" OR SecondaryPlatformCheckboxName = ""){
Break
}
Status := Selenium_LoopToClickXpath(Xpath:=XpathCheckbox,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to check off the checkbox for: %SecondaryPlatformCheckboxName%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
sleep, 250
}
if(ConfirmBeforeSubmit){
OnMessage(0x44, "OnMsgBoxUserConfirmation")
MsgBox 0x21, User Confirmation, Please check that all data was input correctly and fix any mistakes and then click PROCEED to finalize the Upload.`n`nClick STOP to cancel the rest of this Upload and move on to the next website.
OnMessage(0x44, "")
IfMsgBox OK, {
} Else IfMsgBox Cancel, {
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of automation for this site.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
/*
*/
; click the "next" button to finalize the upload
Xpath = (//button[@class='rounded-full px-6 py-2 bg-primary hover:brightness-[0.92] cursor-pointer'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click "Next" to finalize the upload
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
try, driver.get("https://rumble.com/account/live-streaming")
Xpath = (//a[normalize-space()='Livestream Coming Soonish!'])[1]
; Try ElementOuterHTML := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
RumbleURLSlug := GetHTMLValueFromXpathOuterHTML(XPATH, "href")
if(RumbleURLSlug = "" or RumbleURLSlug = "Failed"){
Message = Failed to grab Rumble URL Slug from Livestreams Page
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
RumbleLivestreamURL := "https://rumble.com" . RumbleURLSlug
IniWrite, %RumbleLivestreamURL%, %PostStatusesFilepath%, Livestream,RumbleLivestreamURL
return

BIN
Version.ini Normal file

Binary file not shown.