Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd7c85e22e | |||
| ca0b6ce1b7 | |||
| a576a194c1 | |||
| 9cbe1410e5 | |||
| f339ede04c | |||
| 4f4361276f |
@@ -267,6 +267,12 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
|||||||
OriginalVideoDescription := VideoDescription
|
OriginalVideoDescription := VideoDescription
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(FileNameWExt = "summary.txt"){
|
||||||
|
FileRead, VideoSummary, %A_LoopFileFullPath%
|
||||||
|
; DescriptionCharCount := StrLen(VideoDescription)
|
||||||
|
OriginalVideoSummary := VideoSummary
|
||||||
|
}
|
||||||
|
|
||||||
if(FileNameWExt = "keywords.txt"){
|
if(FileNameWExt = "keywords.txt"){
|
||||||
FileRead, VideoTags, %A_LoopFileFullPath%
|
FileRead, VideoTags, %A_LoopFileFullPath%
|
||||||
FileRead, PodcastTags, %A_LoopFileFullPath%
|
FileRead, PodcastTags, %A_LoopFileFullPath%
|
||||||
@@ -777,7 +783,7 @@ IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
|||||||
|
|
||||||
|
|
||||||
; Log Basic info to the errorlogging file
|
; Log Basic info to the errorlogging file
|
||||||
Message = %ScriptName% v%ScriptVersion%: Starting Upload `nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
Message = Starting Upload with %ScriptName% v%ScriptVersion%:`nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
Message := "VideoTitle: " VideoTitle
|
Message := "VideoTitle: " VideoTitle
|
||||||
@@ -801,6 +807,7 @@ SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|||||||
; Convert Video Title and Description into javascript formatting for sending to pages through js instead of plain selenium
|
; Convert Video Title and Description into javascript formatting for sending to pages through js instead of plain selenium
|
||||||
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
||||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
|
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
||||||
|
|
||||||
; -------------------------------/Log Info To Text-------------------------------
|
; -------------------------------/Log Info To Text-------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -124,11 +124,15 @@ Loop, 10 { ; Attempt to input video description a couple of times
|
|||||||
Message = Inputting Tags
|
Message = Inputting Tags
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
; Convert tags into #hasthtags
|
; Get first 3 tags from Video Tags array
|
||||||
Loop, 3 {
|
Loop, 3 {
|
||||||
BitchuteTags .= VideoTagsArray[A_Index] . " "
|
BitchuteTags .= ArrayOfVideoTags[A_Index] . " "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Message = Inputting Tags: %BitchuteTags%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
; input Search Terms (Tags)
|
; input Search Terms (Tags)
|
||||||
Xpath = //input[@placeholder='Search Terms']
|
Xpath = //input[@placeholder='Search Terms']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitchuteTags)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitchuteTags)
|
||||||
@@ -137,6 +141,13 @@ Message = Failed to input search terms (tags)
|
|||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
js = return document.querySelector("#hashtags").value;
|
||||||
|
try CurrentHashTagValue := driver.executeScript(JS) ;Execute Javascript
|
||||||
|
if(CurrentHashTagValue = ""){
|
||||||
|
Message = Tags that got input into page: %CurrentHashTagValue%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
; Upload Thumbnail
|
; Upload Thumbnail
|
||||||
Message = Attaching Thumbnail
|
Message = Attaching Thumbnail
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ Return
|
|||||||
|
|
||||||
|
|
||||||
JSBrighteonVideoDescription := FormatTextToJSText(VideoDescription)
|
JSBrighteonVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
; Msgbox % "JSBrighteonVideoDescription: " JSBrighteonVideoDescription
|
|
||||||
|
|
||||||
|
|
||||||
; descriptions longer than 5k characters just fail to get input so trim them to below 5000 characters
|
; descriptions longer than 5k characters just fail to get input so trim them to below 5000 characters
|
||||||
if(StrLen(VideoDescription) >= 5000){
|
if(StrLen(VideoDescription) >= 5000){
|
||||||
@@ -112,6 +113,10 @@ try driver.FindElementByXPath(Xpath).click()
|
|||||||
|
|
||||||
CheckForAlerts()
|
CheckForAlerts()
|
||||||
|
|
||||||
|
if(BrighteonUploadAttempt){
|
||||||
|
Sleep, 2000
|
||||||
|
}
|
||||||
|
|
||||||
Message = Uploading Video
|
Message = Uploading Video
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
; Upload Video
|
; Upload Video
|
||||||
@@ -133,6 +138,25 @@ loop, 3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; input with js. Doesn't work in production, but does in the ConnectActiveTab script
|
||||||
|
/*
|
||||||
|
SaveOrPostProgress(Message:="Inputting title with JS",PostType:="Tooltip")
|
||||||
|
|
||||||
|
; Input Title of the Video
|
||||||
|
js = document.querySelector("#name").value = "%JSVideoDescription%";
|
||||||
|
driver.executeScript(JS) ;Execute Javascript
|
||||||
|
|
||||||
|
SaveOrPostProgress(Message:="Waiting 5 seconds to check if input was saved",PostType:="Tooltip")
|
||||||
|
sleep, 5000
|
||||||
|
|
||||||
|
Xpath = //input[@id='name']
|
||||||
|
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.SPACE)
|
||||||
|
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.BACKSPACE) ;Sends Variable to an Xpath Item
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Input Title of the Video
|
; Input Title of the Video
|
||||||
Xpath = //input[@id='name']
|
Xpath = //input[@id='name']
|
||||||
try driver.FindElementByXPath(Xpath).SendKeys(VideoTitle) ;Sends Variable to an Xpath Item
|
try driver.FindElementByXPath(Xpath).SendKeys(VideoTitle) ;Sends Variable to an Xpath Item
|
||||||
@@ -162,13 +186,24 @@ loop, 3 {
|
|||||||
|
|
||||||
TooltipThis("Inputting Video Description")
|
TooltipThis("Inputting Video Description")
|
||||||
|
|
||||||
|
; Attempt to input video description multiple time in case Brighteon rejects the input
|
||||||
|
|
||||||
; Attempt to input video description a couple of times
|
|
||||||
Loop, 10 {
|
Loop, 10 {
|
||||||
if(A_index = 10){
|
if(A_index = 10){
|
||||||
Message = Failed to input Video Description after 10 attempts.
|
Message = Failed to input Video Description after 10 attempts.
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
|
||||||
|
if(!BrighteonUploadAttempt){
|
||||||
|
|
||||||
|
Message = Re-Trying Entire Upload
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
|
||||||
|
BrighteonUploadAttempt := 2
|
||||||
|
goto, BrighteonUpload
|
||||||
|
}
|
||||||
|
|
||||||
|
Message = Brighteon Upload Failed after 2 seperate individual attempts. Please try uploading manually and report any errors.
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
|
||||||
SaveDriverURLOFErrorPage()
|
SaveDriverURLOFErrorPage()
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
@@ -187,8 +222,8 @@ Loop, 10 {
|
|||||||
|
|
||||||
sleep, 5000
|
sleep, 5000
|
||||||
|
|
||||||
|
; get text that was input into description box
|
||||||
js = return document.querySelector("div[class='e-content e-lib e-keyboard'] p").innerText;
|
js = return document.querySelector("#richtexteditor_747903514_0rte-view").innerText;
|
||||||
try Input_Description := driver.executeScript(JS) ;Execute Javascript
|
try Input_Description := driver.executeScript(JS) ;Execute Javascript
|
||||||
|
|
||||||
Input_DescriptionStrLen := StrLen(Input_Description)
|
Input_DescriptionStrLen := StrLen(Input_Description)
|
||||||
@@ -218,9 +253,9 @@ if(VideoThumbFilepath != "") {
|
|||||||
|
|
||||||
|
|
||||||
; Brighteon has a max of 25 for tags.
|
; Brighteon has a max of 25 for tags.
|
||||||
if(VideoTagsArray.Length() > 25){
|
if(ArrayOfVideoTags.Length() > 25){
|
||||||
Loop % 24 {
|
Loop % 24 {
|
||||||
BrighteonKeywords := VideoTagsArray[A_Index]
|
BrighteonKeywords := ArrayOfVideoTags[A_Index]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else,
|
else,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSpace - 2)
|
|||||||
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
||||||
|
|
||||||
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
|
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
|
||||||
DescriptionCharCountXPos := EditBoxWidths - 40
|
DescriptionCharCountXPos := EditBoxHalfWidths - 40
|
||||||
|
|
||||||
PageTwoXStartPos := EditBoxWidths + 50
|
PageTwoXStartPos := EditBoxWidths + 50
|
||||||
|
|
||||||
@@ -114,36 +114,30 @@ Gui, Font, Normal
|
|||||||
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
||||||
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
||||||
|
|
||||||
|
; Description/Summary Headers
|
||||||
; Video Description
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Description
|
||||||
if(NoOriginalVideoDescription)
|
Gui, Add, Text,yp+0 x%ColumnOneHalfWidthXPos%,Summary
|
||||||
Gui, Add, Text,cRed y+%Marginspace% x%Marginspace%,Video Description
|
|
||||||
else,
|
Gui, Font, Normal
|
||||||
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Video Description:
|
; Video Description edit box
|
||||||
|
Gui, Add, Edit,x%Marginspace% y+5 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
||||||
|
; Video Summary Edit Box
|
||||||
if(TestingMode)
|
Gui, Add, Edit,x%ColumnOneHalfWidthXPos% yp+0 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoSummary gUpdateVars,%VideoSummary%
|
||||||
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
|
|
||||||
|
|
||||||
if(DevMode)
|
|
||||||
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
|
|
||||||
|
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit,x%Marginspace% y+2 w%EditBoxWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
|
||||||
gui, font, s8
|
gui, font, s8
|
||||||
Gui, font, Bold
|
Gui, Add, Edit, x%Marginspace% y+5 vDescriptionCharCount, %DescriptionCharCount%
|
||||||
if(DescriptionCharCount > 3000){
|
Gui, Add,Text, yp+4 x+%MarginSpace%,Limits: DM+Bitchute = 3K, Odysee, Brighteon = 5K
|
||||||
Gui, Add, Edit,cRed w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
|
; Gui, font, Bold
|
||||||
}
|
|
||||||
else,
|
|
||||||
Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add,Text, yp+3 xp-310, (Platform Char. Limits: DM+Bitchute = 3K, Odysee,Brighteon = 5K)
|
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
Gui, font, Bold
|
Gui, font, Bold
|
||||||
Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths
|
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Add, GroupBox,r8.5 x%MarginSpace% y+10 w%EditBoxWidths% Center, Filepaths
|
||||||
|
|
||||||
; Video Filepath
|
; Video Filepath
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
@@ -292,9 +286,6 @@ else, {
|
|||||||
|
|
||||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus% gUpdateVars, Odysee Video
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus% gUpdateVars, Odysee Video
|
||||||
|
|
||||||
if(VideoFileSizeInMB < 50)
|
|
||||||
Gui, Add, Checkbox, vTelegram x+%MarginSpaceTripled% yp+0 Checked%TelegramCheckStatus% gUpdateVars, Telegram (>50 MB)
|
|
||||||
|
|
||||||
|
|
||||||
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
|
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
|
||||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus% gUpdateVars, Odysee Audio
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus% gUpdateVars, Odysee Audio
|
||||||
|
|||||||
@@ -248,8 +248,12 @@ Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000
|
|||||||
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)
|
||||||
|
|
||||||
|
if(VideoSummary){
|
||||||
|
js = document.getElementById('summary').value = "%JSVideoSummary%";
|
||||||
|
try driver.executeScript(js)
|
||||||
|
}
|
||||||
|
|
||||||
Message = Inputting Tags
|
Message = Inputting Tags
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
[Video-Uploader]
|
[Video-Uploader]
|
||||||
Version=3.31
|
Version=3.33
|
||||||
Name=Freedomain Video Uploader
|
Name=Freedomain Video Uploader
|
||||||
Reference in New Issue
Block a user