check Bitchute URl and Brighteon URL for processing status and skip them in Discord + Telegram if still processing
This commit is contained in:
@@ -16,46 +16,67 @@ if(DiscordVideosWebhookURL = ""){
|
|||||||
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
||||||
|
|
||||||
|
|
||||||
Message :=
|
VideoLinks :=
|
||||||
|
|
||||||
|
|
||||||
|
TooltipMessage = Checking Bitchute and Brighteon URL for Processing Status
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
; check the status of the Bitchute URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
||||||
if(BitChuteURL != "")
|
if(BitChuteURL != "")
|
||||||
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
|
VideoLinks .= "[BitChute](<" . BitChuteURL . ">) \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
; check the status of the Brighteon URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
||||||
if(BrighteonURL != "")
|
if(BrighteonURL != "")
|
||||||
Message .= "[Brighteon](<" . BrighteonURL . ">) \| "
|
VideoLinks .= "[Brighteon](<" . BrighteonURL . ">) \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
ErrorLogMsg = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=ErrorLogMsg,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(OdyseeVideoURL != "")
|
if(OdyseeVideoURL != "")
|
||||||
Message .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
VideoLinks .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||||
|
|
||||||
if(OdyseeAudioURL != "")
|
if(OdyseeAudioURL != "")
|
||||||
Message .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
VideoLinks .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
||||||
|
|
||||||
if(RumbleURL != "")
|
if(RumbleURL != "")
|
||||||
Message .= "[Rumble](<" . RumbleURL . ">) \| "
|
VideoLinks .= "[Rumble](<" . RumbleURL . ">) \| "
|
||||||
|
|
||||||
if(DailyMotionURL != "")
|
if(DailyMotionURL != "")
|
||||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
VideoLinks .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
||||||
|
|
||||||
if(PodcastTranscriptURL != "")
|
if(PodcastTranscriptURL != "")
|
||||||
Message .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
VideoLinks .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
||||||
|
|
||||||
if(PodcastNumber != "")
|
if(PodcastNumber != "")
|
||||||
Message .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
VideoLinks .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||||
|
|
||||||
|
|
||||||
; StrLenOfDiscordMessage :=
|
; StrLenOfDiscordMessage :=
|
||||||
|
|
||||||
; trim the video description if Title + Body + Links is longer than 2000 chars
|
; trim the video description if Title + Body + Links is longer than 2000 chars
|
||||||
if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(Message)) > 2000){
|
if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(VideoLinks)) > 2000){
|
||||||
|
|
||||||
DiscordAPICharsLeft := 2000 - StrLen(VideoTitle) - StrLen(Message) - 15
|
DiscordAPICharsLeft := 2000 - StrLen(VideoTitle) - StrLen(VideoLinks) - 15
|
||||||
|
|
||||||
DiscordVideoDescription := SubStr(VideoDescription, 1, DiscordAPICharsLeft) . "..."
|
DiscordVideoDescription := SubStr(VideoDescription, 1, DiscordAPICharsLeft) . "..."
|
||||||
}
|
}
|
||||||
else,
|
else,
|
||||||
DiscordVideoDescription := VideoDescription
|
DiscordVideoDescription := VideoDescription
|
||||||
|
|
||||||
Message := "**" . VideoTitle . "**" . "`n" . Message . "`n" . DiscordVideoDescription
|
Message := "**" . VideoTitle . "**" . "`n" . VideoLinks . "`n" . DiscordVideoDescription
|
||||||
|
|
||||||
Status := UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
Status := UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
||||||
Message = API Response:`n%Status%
|
Message = API Response:`n%Status%
|
||||||
|
|||||||
@@ -45,11 +45,31 @@ TelegramBodymessage := ASCIISTRReplace(VideoDescription)
|
|||||||
|
|
||||||
LineBreakChar = `%0A ; Used for API
|
LineBreakChar = `%0A ; Used for API
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; check the status of the Bitchute URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
||||||
if(BitChuteURL != "")
|
if(BitChuteURL != "")
|
||||||
VideoLinks .= "[BitChute](" . BitChuteURL . ") \| "
|
VideoLinks .= "[BitChute](" . BitChuteURL . ") \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; check the status of the Brighteon URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
||||||
if(BrighteonURL != "")
|
if(BrighteonURL != "")
|
||||||
VideoLinks .= "[Brighteon](" . BrighteonURL . ") \| "
|
VideoLinks .= "[Brighteon](" . BrighteonURL . ") \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
LogMessage = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(OdyseeVideoURL != "")
|
if(OdyseeVideoURL != "")
|
||||||
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||||
|
|||||||
Reference in New Issue
Block a user