Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 777cfaa242 | |||
| dd7c85e22e | |||
| ca0b6ce1b7 |
@@ -267,6 +267,12 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
||||
OriginalVideoDescription := VideoDescription
|
||||
}
|
||||
|
||||
if(FileNameWExt = "summary.txt"){
|
||||
FileRead, VideoSummary, %A_LoopFileFullPath%
|
||||
; DescriptionCharCount := StrLen(VideoDescription)
|
||||
OriginalVideoSummary := VideoSummary
|
||||
}
|
||||
|
||||
if(FileNameWExt = "keywords.txt"){
|
||||
FileRead, VideoTags, %A_LoopFileFullPath%
|
||||
FileRead, PodcastTags, %A_LoopFileFullPath%
|
||||
@@ -290,7 +296,7 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
||||
|
||||
}
|
||||
|
||||
if(FileExt = "png" OR FileExt = "jpg"){
|
||||
if(FileExt = "png" OR FileExt = "jpg" OR FileExt = "jpeg"){
|
||||
VideoThumbFilepath := A_LoopFileFullPath
|
||||
}
|
||||
}
|
||||
@@ -342,8 +348,8 @@ Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the direct
|
||||
VideoLinksIniFile = %VideoFolderDir%\VideoLinks.ini
|
||||
|
||||
if(FileExist(VideoLinksIniFile)){
|
||||
; IniRead, StreamanityURL, %VideoLinksIniFile%, URLs, StreamanityURL, %A_Space%
|
||||
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
||||
|
||||
; LBRY
|
||||
IniRead, LBRYURLSlug, %VideoLinksIniFile%, Misc, LBRYURLSlug, %A_Space%
|
||||
if(LBRYURLSlug = ""){
|
||||
@@ -371,7 +377,8 @@ if(FileExist(VideoLinksIniFile)){
|
||||
IniRead, DailyMotionURL, %VideoLinksIniFile%, URLs, DailyMotionURL, %A_Space%
|
||||
IniRead, PodcastNumber, %VideoLinksIniFile%, Misc, PodcastNumber, %A_Space%
|
||||
IniRead, LocalsURL, %VideoLinksIniFile%, URLs, LocalsURL, %A_Space%
|
||||
IniRead, FacebookURL, %VideoLinksIniFile%, URLs, FacebookURL, %A_Space%
|
||||
IniRead, PodcastTranscriptURL, %VideoLinksIniFile%, URLs, PodcastTranscriptURL, %A_Space%
|
||||
|
||||
|
||||
; MISC
|
||||
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
||||
@@ -777,7 +784,7 @@ IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||
|
||||
|
||||
; 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")
|
||||
|
||||
Message := "VideoTitle: " VideoTitle
|
||||
@@ -801,6 +808,7 @@ SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
; Convert Video Title and Description into javascript formatting for sending to pages through js instead of plain selenium
|
||||
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
||||
|
||||
; -------------------------------/Log Info To Text-------------------------------
|
||||
|
||||
@@ -1019,9 +1027,10 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
||||
; ------------------------------------------------
|
||||
; @todo: this can be converted into 1 gosub, with if/else statements based on the button clicked
|
||||
|
||||
CopyPodcastNumber:
|
||||
Clipboard := PodcastNumber
|
||||
SaveOrPostProgress(Message:=PodcastNumber "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
CopyPodcastTranscriptURL:
|
||||
Clipboard := PodcastTranscriptURL
|
||||
Message := PodcastTranscriptURL . "`nCopied to Clipboard"
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
sleep, 1000
|
||||
ToolTip
|
||||
Return
|
||||
@@ -1101,7 +1110,7 @@ Return
|
||||
; @todo: Add thumbnail status to this
|
||||
; @todo: add podcast tags to this
|
||||
UpdateINI:
|
||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, URLs, PodcastNumber
|
||||
IniWrite, %PodcastTranscriptURL%, %VideoLinksIniFile%, URLs, PodcastTranscriptURL
|
||||
IniWrite, %VideoTitle%, %VideoLinksIniFile%, Misc, VideoTitle
|
||||
IniWrite, %LocalsURL%, %VideoLinksIniFile%, URLs, LocalsURL
|
||||
IniWrite, %RumbleURL%, %VideoLinksIniFile%, URLs, RumbleURL
|
||||
|
||||
@@ -124,11 +124,15 @@ Loop, 10 { ; Attempt to input video description a couple of times
|
||||
Message = Inputting Tags
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
; Convert tags into #hasthtags
|
||||
; Get first 3 tags from Video Tags array
|
||||
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)
|
||||
Xpath = //input[@placeholder='Search Terms']
|
||||
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")
|
||||
}
|
||||
|
||||
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
|
||||
Message = Attaching Thumbnail
|
||||
|
||||
@@ -8,7 +8,8 @@ Return
|
||||
|
||||
|
||||
JSBrighteonVideoDescription := FormatTextToJSText(VideoDescription)
|
||||
; Msgbox % "JSBrighteonVideoDescription: " JSBrighteonVideoDescription
|
||||
|
||||
|
||||
|
||||
; descriptions longer than 5k characters just fail to get input so trim them to below 5000 characters
|
||||
if(StrLen(VideoDescription) >= 5000){
|
||||
@@ -137,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
|
||||
Xpath = //input[@id='name']
|
||||
try driver.FindElementByXPath(Xpath).SendKeys(VideoTitle) ;Sends Variable to an Xpath Item
|
||||
@@ -166,9 +186,7 @@ loop, 3 {
|
||||
|
||||
TooltipThis("Inputting Video Description")
|
||||
|
||||
|
||||
|
||||
; Attempt to input video description a couple of times
|
||||
; Attempt to input video description multiple time in case Brighteon rejects the input
|
||||
Loop, 10 {
|
||||
if(A_index = 10){
|
||||
Message = Failed to input Video Description after 10 attempts.
|
||||
@@ -204,8 +222,8 @@ Loop, 10 {
|
||||
|
||||
sleep, 5000
|
||||
|
||||
|
||||
js = return document.querySelector("div[class='e-content e-lib e-keyboard'] p").innerText;
|
||||
; get text that was input into description box
|
||||
js = return document.querySelector("#richtexteditor_747903514_0rte-view").innerText;
|
||||
try Input_Description := driver.executeScript(JS) ;Execute Javascript
|
||||
|
||||
Input_DescriptionStrLen := StrLen(Input_Description)
|
||||
|
||||
@@ -253,7 +253,7 @@ Gui, Font, Bold
|
||||
; Settings Section
|
||||
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
||||
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
|
||||
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip Progress
|
||||
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip of Actions
|
||||
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
|
||||
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
|
||||
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
; Gui, Add, Text,x10 y+10, Podcast #:
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastNumber, Podcast #
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTranscriptURL,Transcript URL
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% w%ResultEditBoxWidths% gUpdateVars vPodcastNumber, %PodcastNumber%
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% w%ResultEditBoxWidths% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
|
||||
|
||||
@@ -254,9 +254,10 @@ Check_For_Stuck_Video_Upload(Index_Number, Upload_Status){
|
||||
}
|
||||
} ; end of func
|
||||
|
||||
|
||||
/*
|
||||
*/
|
||||
; Find the longest word in a string of words
|
||||
FindLongestWordInString(m, calloutNumber, pos, haystack, pattern){
|
||||
FindLongestWordInString(m, calloutNumber, pos, haystack, pattern){
|
||||
Global wordLength, longestWord
|
||||
|
||||
len := StrLen(m)
|
||||
@@ -268,4 +269,39 @@ Check_For_Stuck_Video_Upload(Index_Number, Upload_Status){
|
||||
|
||||
; MsgBox, %m%
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
; Split a long string into multiple pieces based on the string lengtht you want and return an array with all strings
|
||||
SplitStringWithSentences(text, maxChunkSize) {
|
||||
sentences := StrSplit(text, "\. ") ; split at period with space after it
|
||||
|
||||
currentChunk := ""
|
||||
chunks := []
|
||||
|
||||
Loop, % sentences.Length()
|
||||
{
|
||||
sentence := sentences[A_Index]
|
||||
CurrentChunkAndSentence := currentChunk . sentence
|
||||
; Msgbox % "CurrentChunkAndSentence: " CurrentChunkAndSentence
|
||||
; msgbox % StrLen(CurrentChunkAndSentence)
|
||||
|
||||
if (StrLen(CurrentChunkAndSentence) <= maxChunkSize)
|
||||
{
|
||||
currentChunk .= sentence . "\. "
|
||||
}
|
||||
else
|
||||
{
|
||||
chunks.Push(currentChunk)
|
||||
currentChunk := sentence . "\. "
|
||||
}
|
||||
}
|
||||
|
||||
if (currentChunk != "")
|
||||
chunks.Push(currentChunk)
|
||||
|
||||
return chunks
|
||||
}
|
||||
|
||||
|
||||
@@ -25,13 +25,10 @@ if(SocialMediaDescription = ""){
|
||||
CreateDescriptionForSocialMedia()
|
||||
}
|
||||
|
||||
; Msgbox % "SocialMediaDescription: " SocialMediaDescription
|
||||
|
||||
SubmitDescriptionForDiscordVideosChannel:
|
||||
Message := "**" . VideoTitle . "**" . "`n" . SocialMediaDescription . "`n"
|
||||
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
||||
; Do this with an array!!
|
||||
;
|
||||
|
||||
if(BitChuteURL != "")
|
||||
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
|
||||
@@ -44,23 +41,18 @@ Message .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
Message .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
||||
/*
|
||||
if(OdyseeVideoURL != "")
|
||||
Message .= "[Odysee](<" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
Message .= "[Odysee Audio](<" . OdyseeAudioURL . ") \| "
|
||||
|
||||
*/
|
||||
if(RumbleURL != "")
|
||||
Message .= "[Rumble](<" . RumbleURL . ">) \| "
|
||||
|
||||
/*if(StreamanityURL != "" AND InStr(StreamanityURL, "streamanity.com"))
|
||||
Message .= "[Streamanity](<" . StreamanityURL . ">) \| "
|
||||
|
||||
*/
|
||||
if(DailyMotionURL != "")
|
||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">)"
|
||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
||||
|
||||
if(PodcastTranscriptURL != "")
|
||||
Message .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
||||
|
||||
if(PodcastNumber != "")
|
||||
Message .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||
|
||||
|
||||
UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
||||
|
||||
@@ -56,24 +56,19 @@ VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
VideoLinks .= "[Odysee \(Audio\)](" . OdyseeAudioURL . ") \| "
|
||||
/*
|
||||
if(OdyseeVideoURL != "")
|
||||
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
VideoLinks .= "[Odysee Audio](" . OdyseeAudioURL . ") \| "
|
||||
|
||||
*/
|
||||
if(RumbleURL != "")
|
||||
VideoLinks .= "[Rumble](" . RumbleURL . ") \| "
|
||||
/*
|
||||
if(InStr(StreamanityURL, "https://streamanity.com/video/"))
|
||||
VideoLinks .= "[Streamanity](" . StreamanityURL . ") \| "
|
||||
|
||||
*/
|
||||
if(DailyMotionURL != "")
|
||||
VideoLinks .= "[DailyMotion](" . DailyMotionURL . ") \| "
|
||||
|
||||
if(PodcastTranscriptURL != "")
|
||||
VideoLinks .= "[Video Transcript](" . PodcastTranscriptURL . ") \| "
|
||||
|
||||
if(PodcastNumber != "")
|
||||
VideoLinks .= "[FDRPodcasts](" . "https://fdrpodcasts.com/" . PodcastNumber . ") \| "
|
||||
|
||||
|
||||
TelegramMessage := TelegramVideoTitle . "`n" . TelegramBodymessage . "`n" . VideoLinks
|
||||
|
||||
@@ -83,50 +78,9 @@ StrLenOfMessageAndVideoLinks := StrLen(TelegramVideoTitle) + StrLen(TelegramBody
|
||||
; DevModeMsgBox(StrLenOfMessageAndVideoLinks)
|
||||
|
||||
|
||||
if(StrLenOfMessageAndVideoLinks > 1024){
|
||||
; Telegram SendMessage is limited to 4096 characters
|
||||
if(StrLenOfMessageAndVideoLinks < 4096){ ; split into sendphoto and 1 sendmessage
|
||||
; DevModeMsgBox("Less than 4096 chars")
|
||||
; Photo and Video Title go into SendPhoto
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
; Video Description goes into TelegramMessage
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
|
||||
} ; split into 2 SendMessages
|
||||
else if (StrLenOfMessageAndVideoLinks > 4096 AND StrLenOfMessageAndVideoLinks < 8192){ ; Split into 2 parts
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 4097, 8192)
|
||||
Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
} ; split into 3 sendMessages
|
||||
else if (StrLenOfMessageAndVideoLinks > 8192 AND StrLenOfMessageAndVideoLinks < 12288){ ; Split into 3 parts
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
msgbox % StrLen(TelegramBodymessagePiece)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 4097, 8192)
|
||||
msgbox % StrLen(TelegramBodymessagePiece)
|
||||
DevModeMsgBox(TelegramBodymessagePiece)
|
||||
Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
; TelegramBodymessagePiece := SubStr(TelegramBodymessage, 8193, 12288)
|
||||
; Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
}
|
||||
|
||||
|
||||
} else, { ; if less than 1024 characters, send normally
|
||||
; If Length of Title, Video Links and Message is less than 1024 characters:
|
||||
; ------------------------------------------------
|
||||
if(StrLenOfMessageAndVideoLinks < 1024) {
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
||||
if(InStr(Status, "error_code")){
|
||||
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||
@@ -139,30 +93,58 @@ if(StrLenOfMessageAndVideoLinks > 1024){
|
||||
ToolTip
|
||||
Return
|
||||
}
|
||||
|
||||
}
|
||||
; Msgbox % "SizeOfCaption: " SizeOfCaption
|
||||
; SizeOfCaption := SizeOfCaption +
|
||||
; Message .= VideoLinks
|
||||
; msgbox % StrLen(VideoLinks)
|
||||
|
||||
; Message := StrReplace(Message, "`n", LineBreakChar) ; replace all new line characters with the global charater
|
||||
|
||||
; msgbox % StrLen(Message)
|
||||
}
|
||||
|
||||
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordVideos")
|
||||
; If Title, Links and Message are longer than 1024, but less than 4096, split into 2 pieces: sendphoto and sendmessage
|
||||
; ------------------------------------------------
|
||||
if(StrLenOfMessageAndVideoLinks < 4096){
|
||||
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||
; Photo and Video Title go into SendPhoto
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
; Video Description goes into TelegramMessage
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
|
||||
} else, {
|
||||
; If Title, links and message are longer than 4096 chars, we need to split them into multiple messages
|
||||
; ------------------------------------------------
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
|
||||
; sleep, 2000
|
||||
; Split the Description into 4096 character chunks while preserving sentences
|
||||
; Used 4095 because a ". " has to be put in at the end of the chunk.
|
||||
VideoDescriptionChunks := SplitStringWithSentences(TelegramBodymessage, 4094)
|
||||
|
||||
|
||||
ToolTip
|
||||
CurrentSite :=
|
||||
Return
|
||||
; -------------------------------/Telegram-------------------------------
|
||||
; go through array and post each chunk as new message
|
||||
Loop % VideoDescriptionChunks.Length(){
|
||||
; ArrayItem := ARRAY[A_Index]
|
||||
Description := VideoDescriptionChunks[A_Index]
|
||||
|
||||
|
||||
SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
||||
; Clipboard := Description
|
||||
; msgbox % Description
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||
|
||||
|
||||
; sleep, 2000
|
||||
|
||||
|
||||
ToolTip
|
||||
CurrentSite :=
|
||||
Return
|
||||
; -------------------------------/Telegram-------------------------------
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[Video-Uploader]
|
||||
Version=3.32
|
||||
Version=3.34
|
||||
Name=Freedomain Video Uploader
|
||||
|
||||
Reference in New Issue
Block a user