Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dbdefc5a95 | |||
| 613f9d222a | |||
| f3817cb9f9 | |||
| 478f8f769e | |||
| 1b856287df | |||
| 45e2d2b0f0 | |||
| 76d410e4d3 | |||
| ee21a03d55 | |||
| 540a688733 | |||
| be75660548 | |||
| 9f1388160c | |||
| 4ce82bde6a | |||
| d1e471bd26 | |||
| f5ffe32766 | |||
| dcd947b136 | |||
| 4476bfdda6 | |||
| 5f63640185 | |||
| 6639c907c9 | |||
| 3492ecccee | |||
| 38a579c486 | |||
| 4beb83caa6 | |||
| b98ae5e190 |
BIN
Assets/Screenshots/MainScreen_v341.png
Normal file
BIN
Assets/Screenshots/MainScreen_v341.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 406 KiB |
125
Compile and Release.ahk
Normal file
125
Compile and Release.ahk
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
;---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------------------------------------------------------
|
||||||
|
; [IniFile]
|
||||||
|
; FileNameOfAHKScripttoCompile=
|
||||||
|
; ICOFileName=
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;---VARIABLES-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;---MAIN SCRIPT---------------------------------------------------------------------
|
||||||
|
|
||||||
|
AHKFilepath = %A_ScriptDir%\Freedomain Video Uploader.ahk
|
||||||
|
Exefilepath = %A_ScriptDir%\Freedomain Video Uploader.exe
|
||||||
|
icopath = %A_ScriptDir%\Assets\FreedomainVideo.ico
|
||||||
|
VersionIniFP = %A_ScriptDir%\Version.ini
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Bump the version number in the version.ini file
|
||||||
|
IniRead, VersionNumber, %VersionIniFP%, Video-Uploader, Version, 0.0 ; , Filename, Section, Key [, Default]
|
||||||
|
VersionNumber += .01
|
||||||
|
VersionNumber := SubStr(VersionNumber, 1, 4)
|
||||||
|
; Msgbox % "VersionNumber: " VersionNumber
|
||||||
|
IniWrite, %VersionNumber%, %VersionIniFP%,Video-Uploader, Version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Kill any active intances of the uploaders so the .exe file can be overwriten by the compilation
|
||||||
|
process, close, Freedomain Video Uploader.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%""
|
||||||
|
|
||||||
|
|
||||||
|
InputBox, ReleaseBody, Release Body, Please Input Release Body,
|
||||||
|
|
||||||
|
|
||||||
|
cred := CredRead("FDR-Gitea-Token")
|
||||||
|
GiteaToken := Cred.Password
|
||||||
|
|
||||||
|
; Info for Creating the Release with Gitea-CreateRelease.ps1
|
||||||
|
PS1Filepath = %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Gitea-CreateRelease.ps1
|
||||||
|
APIURL = https://freedomain.dev/api/v1/repos/yuriy/video-uploader/releases?token=%GiteaToken%
|
||||||
|
ReleaseName := VersionNumber
|
||||||
|
ReleaseTag := VersionNumber
|
||||||
|
; ReleaseBody := "-Fixed Item 1--Fixed Item 2--Fixed Item 3"
|
||||||
|
|
||||||
|
Command = Powershell "%PS1Filepath%" "%APIURL%" "%ReleaseName%" "%ReleaseTag%" "%ReleaseBody%"
|
||||||
|
Clipboard := Command
|
||||||
|
Msgbox % "Command: " Command
|
||||||
|
Returned := RunCMD(Command)
|
||||||
|
Clipboard := Returned
|
||||||
|
Msgbox % "Returned: " Returned
|
||||||
|
|
||||||
|
; Pull out the relead ID Number, used for uploading attachmenets
|
||||||
|
SplitText = @{id=
|
||||||
|
SplitText2 = `;
|
||||||
|
ReleaseID := StrSplit(Returned, SplitText)[2]
|
||||||
|
ReleaseID := StrSplit(ReleaseID, SplitText2)[1]
|
||||||
|
|
||||||
|
Clipboard := ReleaseID
|
||||||
|
Msgbox % "ReleaseID: " ReleaseID
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; runcmd()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ExitApp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;---FUNCTIONS-----------------------------------------------------------------------
|
||||||
@@ -14,22 +14,8 @@ CoordMode, Mouse, Screen
|
|||||||
|
|
||||||
;---Notes/Extra Info/#Includes------------------------------------------------------
|
;---Notes/Extra Info/#Includes------------------------------------------------------
|
||||||
|
|
||||||
; msgbox
|
|
||||||
;---VARIABLES-----------------------------------------------------------------------
|
;---VARIABLES-----------------------------------------------------------------------
|
||||||
/*ScriptToCompile = %1%
|
|
||||||
CompileType = %2% ; Testing OR Production
|
|
||||||
if(CompileType = "")
|
|
||||||
CompileType = Testing
|
|
||||||
; Msgbox % "CompileType: " CompileType
|
|
||||||
if(ScriptToCompile = "")
|
|
||||||
ExitApp
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
; Msgbox % "ScriptToCompile: " ScriptToCompile
|
|
||||||
ScriptToCompile = SocialMediaPoster
|
|
||||||
; ScriptToCompile = ScriptUpdater
|
|
||||||
;---MAIN SCRIPT---------------------------------------------------------------------
|
;---MAIN SCRIPT---------------------------------------------------------------------
|
||||||
|
|
||||||
AHKFilepath = %A_ScriptDir%\Freedomain Video Uploader.ahk
|
AHKFilepath = %A_ScriptDir%\Freedomain Video Uploader.ahk
|
||||||
@@ -77,9 +63,6 @@ if(!FileExist(icopath)){
|
|||||||
|
|
||||||
run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%""
|
run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%""
|
||||||
|
|
||||||
|
|
||||||
; OldNotify(ScriptToCompile,"Compiled Successfully",5)
|
|
||||||
; sleep, 5000
|
|
||||||
ExitApp
|
ExitApp
|
||||||
|
|
||||||
|
|
||||||
@@ -67,7 +67,6 @@ global VideoFilepath
|
|||||||
global VideoThumbFilepath
|
global VideoThumbFilepath
|
||||||
global VideoTags
|
global VideoTags
|
||||||
global VideoDescription
|
global VideoDescription
|
||||||
global SocialMediaDescription
|
|
||||||
global DiscordErrorLoggingWebhookBotURL
|
global DiscordErrorLoggingWebhookBotURL
|
||||||
global DiscordVideosWebhookURL
|
global DiscordVideosWebhookURL
|
||||||
global VideoFolderDir
|
global VideoFolderDir
|
||||||
@@ -276,9 +275,12 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
|||||||
|
|
||||||
if(FileNameWExt = "title.txt"){
|
if(FileNameWExt = "title.txt"){
|
||||||
FileRead, VideoTitle, %A_LoopFileFullPath%
|
FileRead, VideoTitle, %A_LoopFileFullPath%
|
||||||
|
|
||||||
|
; Generate the LBRY URL Slug on each startup in case Title changes between runs
|
||||||
LBRYURLSlug := VideoTitle
|
LBRYURLSlug := VideoTitle
|
||||||
|
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
||||||
|
|
||||||
OriginalVideoTitle := VideoTitle
|
OriginalVideoTitle := VideoTitle
|
||||||
OriginalLBRYURLSlug := LBRYURLSlug
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FileNameWExt = "body.txt"){
|
if(FileNameWExt = "body.txt"){
|
||||||
@@ -311,8 +313,14 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
|||||||
FileGetSize, VideoFileSizeInMB, %A_LoopFileFullPath%, M
|
FileGetSize, VideoFileSizeInMB, %A_LoopFileFullPath%, M
|
||||||
|
|
||||||
VideoInfoObj := Filexpro(VideoFilepath,
|
VideoInfoObj := Filexpro(VideoFilepath,
|
||||||
, "System.Video.TotalBitrate" )
|
, "System.Video.TotalBitrate"
|
||||||
VideoTotalBitrate := VideoInfoObj["System.Video.TotalBitrate"]
|
, "System.Video.FrameHeight"
|
||||||
|
, "System.Video.FrameWidth" )
|
||||||
|
try, VideoTotalBitrate := VideoInfoObj["System.Video.TotalBitrate"]
|
||||||
|
try, VideoHeight := VideoInfoObj["System.Video.FrameHeight"]
|
||||||
|
try, VideoWidth := VideoInfoObj["System.Video.FrameWidth"]
|
||||||
|
|
||||||
|
VideoAspectRatio := getAspectRatio(VideoWidth, VideoHeight)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,6 +364,8 @@ Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the direct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;---Read Info From Previous Run And Set Upload Options---
|
;---Read Info From Previous Run And Set Upload Options---
|
||||||
;--------------------------------------------------------
|
;--------------------------------------------------------
|
||||||
VideoLinksIniFile = %VideoFolderDir%\VideoLinks.ini
|
VideoLinksIniFile = %VideoFolderDir%\VideoLinks.ini
|
||||||
@@ -364,10 +374,9 @@ if(FileExist(VideoLinksIniFile)){
|
|||||||
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
||||||
|
|
||||||
; LBRY
|
; LBRY
|
||||||
IniRead, LBRYURLSlug, %VideoLinksIniFile%, Misc, LBRYURLSlug, %A_Space%
|
; removed on 2024/06/24, let's regenerate the slug each time in case the video file changes between runs
|
||||||
if(LBRYURLSlug = ""){
|
; IniRead, LBRYURLSlug, %VideoLinksIniFile%, Misc, LBRYURLSlug, %A_Space%
|
||||||
LBRYURLSlug := OriginalLBRYURLSlug ; video title
|
|
||||||
}
|
|
||||||
; LBRY Video
|
; LBRY Video
|
||||||
IniRead, LBRYVideoURL, %VideoLinksIniFile%, URLs, LBRYVideoURL, %A_Space%
|
IniRead, LBRYVideoURL, %VideoLinksIniFile%, URLs, LBRYVideoURL, %A_Space%
|
||||||
IniRead, LBRYVideoThumb, %VideoLinksIniFile%, Misc, LBRYVideoThumb, %A_Space%
|
IniRead, LBRYVideoThumb, %VideoLinksIniFile%, Misc, LBRYVideoThumb, %A_Space%
|
||||||
@@ -396,14 +405,14 @@ if(FileExist(VideoLinksIniFile)){
|
|||||||
|
|
||||||
; MISC
|
; MISC
|
||||||
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
||||||
IniRead, TempVideoThumbFilepath, %VideoLinksIniFile%, Misc, VideoThumbFilepath, %A_Space%
|
|
||||||
if(TempVideoThumbFilepath){ ; if Video Thumbnail was saved in last run, overwrite variable path that was grabbed in the file loop above
|
; I don't remember why I added this, commenting this out on 2024/06/22 for now
|
||||||
|
; IniRead, TempVideoThumbFilepath, %VideoLinksIniFile%, Misc, VideoThumbFilepath, %A_Space%
|
||||||
|
/* if(TempVideoThumbFilepath){ ; if Video Thumbnail was saved in last run, overwrite variable path that was grabbed in the file loop above
|
||||||
VideoThumbFilepath := TempVideoThumbFilepath
|
VideoThumbFilepath := TempVideoThumbFilepath
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if(VideoFileSizeInMB < 50){
|
|
||||||
IniRead, Telegram, %VideoLinksIniFile%, Misc, Telegram, %A_Space%
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,6 +456,11 @@ if(VideoFileSizeInMB > 6144){
|
|||||||
Brighteon := 0
|
Brighteon := 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Brighteon will fail if video does not have one of the following aspect ratios
|
||||||
|
BrighteonAcceptedAspectRatios := ["4:3","3:4","16:9","9:16"]
|
||||||
|
; Msgbox % "VideoAspectRatio: " VideoAspectRatio
|
||||||
|
VideoHasBrighteonCompatibleAspectRatio := HasVal(BrighteonAcceptedAspectRatios, VideoAspectRatio)
|
||||||
|
|
||||||
|
|
||||||
; Override Website statuses if this is a schedule post based on Argument3
|
; Override Website statuses if this is a schedule post based on Argument3
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
@@ -464,7 +478,8 @@ if(PassedInArgument2_Action = "Scheduled"){
|
|||||||
; }
|
; }
|
||||||
goto, StartScheduledPost
|
goto, StartScheduledPost
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
|
||||||
;---/Read Info From Previous Run And Set Upload Options---
|
;---/Read Info From Previous Run And Set Upload Options---
|
||||||
;--------------------------------------------------------
|
;--------------------------------------------------------
|
||||||
@@ -477,12 +492,10 @@ if(PassedInArgument2_Action = "Scheduled"){
|
|||||||
|
|
||||||
; Main GUI Window
|
; Main GUI Window
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
gosub, SetAndShowMainGUI
|
|
||||||
|
|
||||||
|
|
||||||
; Write current project to ini file for easy reloading
|
; Write current project to ini file for easy reloading
|
||||||
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
||||||
|
|
||||||
|
gosub, SetAndShowMainGUI
|
||||||
|
|
||||||
RunTimeToShowGui := round(((A_TickCount - UStartTime) / 1000), 2)
|
RunTimeToShowGui := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||||
|
|
||||||
@@ -525,7 +538,10 @@ if(PassedInArgument2_Action = "Scheduled"){
|
|||||||
|
|
||||||
; Open folder of the project
|
; Open folder of the project
|
||||||
OpenProjectFolder:
|
OpenProjectFolder:
|
||||||
|
if(FileExist(VideoFolderDir))
|
||||||
run, %VideoFolderDir%
|
run, %VideoFolderDir%
|
||||||
|
else,
|
||||||
|
msgbox, Cannot Open Folder as it no longer exists at:`n%VideoFolderDir%
|
||||||
Return
|
Return
|
||||||
|
|
||||||
ClearVideoLinks:
|
ClearVideoLinks:
|
||||||
@@ -618,19 +634,6 @@ Return
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
CreateDescriptionForSocialMedia(){
|
|
||||||
SplitText = Free Documentaries:
|
|
||||||
|
|
||||||
SocialMediaDescription := StrSplit(VideoDescription, SplitText)
|
|
||||||
SocialMediaDescription := SocialMediaDescription[1]
|
|
||||||
|
|
||||||
if(strlen(SocialMediaDescription) > 1400){
|
|
||||||
SocialMediaDescription := SubStr(SocialMediaDescription, 1, 1400)
|
|
||||||
SocialMediaDescription .= "..."
|
|
||||||
}
|
|
||||||
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
; -------------------------------Upload Video Functionality-------------------------------
|
; -------------------------------Upload Video Functionality-------------------------------
|
||||||
StartScript:
|
StartScript:
|
||||||
WinGetPos, XPosition, YPosition, , , A
|
WinGetPos, XPosition, YPosition, , , A
|
||||||
@@ -704,7 +707,8 @@ LBRYURLSlug := VideoTitle
|
|||||||
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
||||||
|
|
||||||
; Save the LBRY URL Slug to .ini file in case it's needed later
|
; Save the LBRY URL Slug to .ini file in case it's needed later
|
||||||
IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
; removed on 2024/06/24, generating the URL SLugh each run going forward
|
||||||
|
; IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
||||||
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
||||||
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||||
@@ -743,11 +747,17 @@ SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|||||||
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
Message := "Video Information:`n VideoTotalBitrate:" . VideoTotalBitrate . "`nVideoAspectRatio:" . VideoAspectRatio
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,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)
|
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
||||||
|
|
||||||
|
Message = JSVideoSummary:`n %JSVideoSummary%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
; -------------------------------/Log Info To Text-------------------------------
|
; -------------------------------/Log Info To Text-------------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -837,10 +847,9 @@ if(OdyseeAudio){
|
|||||||
if(LocalsGrabURL){
|
if(LocalsGrabURL){
|
||||||
Gosub, LocalsGrabURL
|
Gosub, LocalsGrabURL
|
||||||
}
|
}
|
||||||
|
|
||||||
; // Upload to Sites
|
; // Upload to Sites
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
if(URLOfLastErrorPage){
|
if(URLOfLastErrorPage){
|
||||||
Message = Activating Tab of last failed post.
|
Message = Activating Tab of last failed post.
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||||
@@ -915,7 +924,6 @@ if(PodcastNumber = "") {
|
|||||||
|
|
||||||
gosub, SetGUIVariables
|
gosub, SetGUIVariables
|
||||||
gosub, SetAndShowResultsGUI
|
gosub, SetAndShowResultsGUI
|
||||||
; #include %A_scriptDir%\Modules\GUI-Results-Window.ahk
|
|
||||||
|
|
||||||
SaveCurrentChromeVersionToIniFile()
|
SaveCurrentChromeVersionToIniFile()
|
||||||
|
|
||||||
@@ -1006,88 +1014,30 @@ if(!SocialMediaPosterFilepath or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
|
|
||||||
; Copy Info from GUI to Clipboard
|
; Copy Info from GUI to Clipboard
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
; @todo: this can be converted into 1 gosub, with if/else statements based on the button clicked
|
CopyToClipboard:
|
||||||
|
|
||||||
|
Message = Copying %A_GuiControl% to Clipboard
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||||
|
|
||||||
|
(A_GuiControl = "Transcript URL")?(Clipboard := PodcastTranscriptURL):()
|
||||||
|
(A_GuiControl = "Bitchute")?(Clipboard := BitChuteURL):()
|
||||||
|
(A_GuiControl = "Brighteon")?(Clipboard := BrighteonURL):()
|
||||||
|
(A_GuiControl = "DailyMotion")?(Clipboard := DailyMotionURL):()
|
||||||
|
(A_GuiControl = "Odysee Video")?(Clipboard := OdyseeVideoURL):()
|
||||||
|
(A_GuiControl = "Odysee Audio")?(Clipboard := OdyseeAudioURL):()
|
||||||
|
(A_GuiControl = "Rumble")?(Clipboard := RumbleURL):()
|
||||||
|
(A_GuiControl = "Locals")?(Clipboard := LocalsURL):()
|
||||||
|
(A_GuiControl = "Unauthorized")?(Clipboard := UnauthorizedTVURL):()
|
||||||
|
(A_GuiControl = "Video Tags")?(Clipboard := VideoTags):()
|
||||||
|
(A_GuiControl = "Podcast Tags")?(Clipboard := PodcastTags):()
|
||||||
|
(A_GuiControl = "Description")?(Clipboard := VideoDescription):()
|
||||||
|
(A_GuiControl = "Summary")?(Clipboard := VideoSummary):()
|
||||||
|
|
||||||
CopyPodcastTranscriptURL:
|
|
||||||
Clipboard := PodcastTranscriptURL
|
|
||||||
Message := PodcastTranscriptURL . "`nCopied to Clipboard"
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
sleep, 1000
|
||||||
ToolTip
|
ToolTip
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
|
||||||
CopyVideoTitle:
|
|
||||||
Clipboard := VideoTitle
|
|
||||||
SaveOrPostProgress(Message:=VideoTitle "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyBitChuteURL:
|
|
||||||
Clipboard := BitChuteURL
|
|
||||||
SaveOrPostProgress(Message:=BitChuteURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyBrighteonURL:
|
|
||||||
Clipboard := BrighteonURL
|
|
||||||
SaveOrPostProgress(Message:=BrighteonURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyDailyMotionURL:
|
|
||||||
Clipboard := DailyMotionURL
|
|
||||||
SaveOrPostProgress(Message:=DailyMotionURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyOdyseeVideoURL:
|
|
||||||
Clipboard := OdyseeVideoURL
|
|
||||||
SaveOrPostProgress(Message:=OdyseeVideoURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyOdyseeAudioURL:
|
|
||||||
Clipboard := OdyseeAudioURL
|
|
||||||
SaveOrPostProgress(Message:=OdyseeAudioURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyRumbleURL:
|
|
||||||
Clipboard := RumbleURL
|
|
||||||
SaveOrPostProgress(Message:=RumbleURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
|
|
||||||
CopyVideoTags:
|
|
||||||
Clipboard := VideoTags
|
|
||||||
SaveOrPostProgress(Message:=VideoTags "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyPodcastTags:
|
|
||||||
Clipboard := PodcastTags
|
|
||||||
SaveOrPostProgress(Message:=PodcastTags "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyVideoDescription:
|
|
||||||
Clipboard := VideoDescription
|
|
||||||
SaveOrPostProgress(Message:="Video Description`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
; @todo: Add thumbnail status to this
|
; @todo: Add thumbnail status to this
|
||||||
; @todo: add podcast tags to this
|
; @todo: add podcast tags to this
|
||||||
UpdateINI:
|
UpdateINI:
|
||||||
@@ -1190,6 +1140,10 @@ Return
|
|||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Shared-GoTos.ahk
|
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Shared-GoTos.ahk
|
||||||
|
|
||||||
|
; Special Website Functions
|
||||||
|
; ------------------------------------------------
|
||||||
|
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Locals-Functions.ahk
|
||||||
|
|
||||||
; GUI Windows
|
; GUI Windows
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
#include C:\Users\%A_Username%\Syncthing\Git\Freedomain-Video-Uploader\Modules\GUI-Main-Window.ahk
|
#include C:\Users\%A_Username%\Syncthing\Git\Freedomain-Video-Uploader\Modules\GUI-Main-Window.ahk
|
||||||
|
|||||||
Submodule Lib/Freedomain-Posters-Shared-Functions updated: a3d89a9892...62e8afebb8
@@ -6,13 +6,24 @@ Message = Starting Upload
|
|||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
Status := NavigateFromBaseURLTo("https://www.bitchute.com/myupload", "BitChute Video Uploader")
|
Status := NavigateFromBaseURLTo("https://www.bitchute.com/")
|
||||||
if(Status)
|
if(Status)
|
||||||
Return
|
Return
|
||||||
|
|
||||||
Message = Checking Login Status
|
Message = Checking Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
Xpath = (//div[normalize-space()='Sign in'])[1]
|
||||||
|
try LoginStatus := driver.findelementbyxpath(Xpath).Attribute("innerText")
|
||||||
|
if(LoginStatus = "Sign In"){
|
||||||
|
Message = Logged out. Trying to Log Back In
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
try TabUrl := driver.url
|
try TabUrl := driver.url
|
||||||
if(InStr(TabUrl, "/accounts/login/")){
|
if(InStr(TabUrl, "/accounts/login/")){
|
||||||
if(AutoLogin){
|
if(AutoLogin){
|
||||||
@@ -35,10 +46,33 @@ if(InStr(TabUrl, "/accounts/login/")){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
CheckForAlerts()
|
CheckForAlerts()
|
||||||
|
|
||||||
|
if(BitchuteUploadUploadURL = "")
|
||||||
|
{
|
||||||
|
; click on video upload icon so dropdown menu appears
|
||||||
|
Xpath = (//i[normalize-space()='video_call'])[1]
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
|
; grab upload url from dropdown menu
|
||||||
|
Xpath = (//a[@id='id_upload_video'])[1]
|
||||||
|
UploadURL := GetHTMLValueFromXpathOuterHTML(XPATH, "href")
|
||||||
|
|
||||||
|
if(!InStr(UploadURL, "https")){
|
||||||
|
Message = Failed to Grab Upload Page URL from Home Page
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
|
||||||
|
UploadURL := StrReplace(UploadURL, "api.bitchute", "old.bitchute")
|
||||||
|
}
|
||||||
|
|
||||||
|
try, driver.Get(UploadURL) ;Open selected URL
|
||||||
|
try, driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||||
|
|
||||||
Message = Inputting Title
|
Message = Inputting Title
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
@@ -130,7 +164,7 @@ Loop, 3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Message = Inputting Tags: %BitchuteTags%
|
Message = Inputting Tags: %BitchuteTags%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
; input Search Terms (Tags)
|
; input Search Terms (Tags)
|
||||||
@@ -286,9 +320,10 @@ if(VideoHref = ""){
|
|||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
BitChuteURL := "https://www.bitchute.com/" . VideoHref
|
BitChuteURL := "https://old.bitchute.com/" . VideoHref
|
||||||
BitChuteURL := StrReplace(BitchuteURL, "//video", "/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
|
||||||
driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||||
@@ -315,6 +350,9 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
|||||||
Xpath = //button[normalize-space()='Save']
|
Xpath = //button[normalize-space()='Save']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
|
|
||||||
|
BitChuteURL := StrReplace(BitchuteURL, "old.", "")
|
||||||
|
|
||||||
Message = Upload Complete:`n%BitChuteURL%
|
Message = Upload Complete:`n%BitChuteURL%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
IniWrite, %BitChuteURL%, %VideoLinksIniFile%, URLs, BitChuteURL
|
IniWrite, %BitChuteURL%, %VideoLinksIniFile%, URLs, BitChuteURL
|
||||||
|
|||||||
@@ -200,8 +200,6 @@ Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h%SecondaryButtonHeights
|
|||||||
|
|
||||||
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gScheduleUpload, Schedule for Later
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gScheduleUpload, Schedule for Later
|
||||||
|
|
||||||
; Gui, Add, Button, w%EditBoxFourthWidths% x%MarginSize% y+%MarginSize% h%SecondaryButtonHeights% gOpenProjectFolder, Open New Project
|
|
||||||
|
|
||||||
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vChromeUpdateAvailable gUpdateChrome, Chrome Up-to-Date
|
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vChromeUpdateAvailable gUpdateChrome, Chrome Up-to-Date
|
||||||
|
|
||||||
Gui, Add, Button, x+%MarginSize% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Status
|
Gui, Add, Button, x+%MarginSize% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Status
|
||||||
@@ -210,6 +208,9 @@ Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights%
|
|||||||
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable gUpdatePostScheduler, Post Scheduler Up-To-Date
|
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable gUpdatePostScheduler, Post Scheduler Up-To-Date
|
||||||
; Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable, Post Scheduler Up-To-Date
|
; Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable, Post Scheduler Up-To-Date
|
||||||
|
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h%SecondaryButtonHeights%
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gReloadScript, Open New Project
|
||||||
|
|
||||||
|
|
||||||
if(DevMode){
|
if(DevMode){
|
||||||
Gui, Add, Button, x%MarginSize% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
|
Gui, Add, Button, x%MarginSize% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
|
||||||
@@ -278,11 +279,16 @@ Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vOdyseeAudio Checked%O
|
|||||||
|
|
||||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vRumble Checked%Rumble% gUpdateVars, Rumble
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vRumble Checked%Rumble% gUpdateVars, Rumble
|
||||||
|
|
||||||
if(VideoTotalBitrate > 300000)
|
; Brighteon Does not accept videos lower than 300kbps or that don't have the appropriate aspect ratio
|
||||||
Gui, Add, Checkbox, vBrighteon y+%MarginSize% Checked%Brighteon% gUpdateVars, Brighteon
|
if(VideoTotalBitrate < 300000 OR !VideoHasBrighteonCompatibleAspectRatio){
|
||||||
else,{
|
if(!VideoHasBrighteonCompatibleAspectRatio)
|
||||||
|
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Aspect Ratio is %VideoAspectRatio%)
|
||||||
|
else,
|
||||||
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
||||||
}
|
}
|
||||||
|
else,{
|
||||||
|
Gui, Add, Checkbox, vBrighteon y+%MarginSize% Checked%Brighteon% gUpdateVars, Brighteon
|
||||||
|
}
|
||||||
|
|
||||||
Gui, Add, Checkbox, vDailyMotion y+%MarginSize% Checked%DailyMotion% gUpdateVars, DailyMotion
|
Gui, Add, Checkbox, vDailyMotion y+%MarginSize% Checked%DailyMotion% gUpdateVars, DailyMotion
|
||||||
|
|
||||||
@@ -358,67 +364,67 @@ Gosub, SetGUIVariables
|
|||||||
|
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTranscriptURL,Transcript URL
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard,Transcript URL
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% w%ResultEditBoxWidth% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% w%ResultEditBoxWidth% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Bitchute
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidth% gUpdateVars , %BitChuteURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidth% gUpdateVars , %BitChuteURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyBrighteonURL, Brighteon
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Brighteon
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidth% gUpdateVars , %BrighteonURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidth% gUpdateVars , %BrighteonURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyDailyMotionURL, DailyMotion
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, DailyMotion
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidth% gUpdateVars , %DailyMotionURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidth% gUpdateVars , %DailyMotionURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeVideoURL, Odysee Video
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Odysee Video
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidth% gUpdateVars, %OdyseeVideoURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidth% gUpdateVars, %OdyseeVideoURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeAudioURL, Odysee Audio
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Odysee Audio
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidth% gUpdateVars , %OdyseeAudioURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidth% gUpdateVars , %OdyseeAudioURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyRumbleURL, Rumble
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Rumble
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidth% gUpdateVars , %RumbleURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidth% gUpdateVars , %RumbleURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths%, Locals
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Locals
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidth% gUpdateVars, %LocalsURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidth% gUpdateVars, %LocalsURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths%, Unauthorized
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Unauthorized
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vUnauthorizedTVURL w%ResultEditBoxWidth% gUpdateVars, %UnauthorizedTVURL%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vUnauthorizedTVURL w%ResultEditBoxWidth% gUpdateVars, %UnauthorizedTVURL%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoTags vVideoTagsEdit, Video Tags
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Video Tags
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidth% gUpdateVars , %VideoTags%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidth% gUpdateVars , %VideoTags%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTags, Podcast Tags
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Podcast Tags
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidth% gUpdateVars , %Podcasttags%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidth% gUpdateVars , %Podcasttags%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Description
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Description
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoDescription w%ResultEditBoxWidth% gUpdateVars , %VideoDescription%
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoDescription w%ResultEditBoxWidth% gUpdateVars , %VideoDescription%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Summary
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Summary
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
|
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
@@ -432,7 +438,7 @@ Gui, Add, Button, x%MarginSize% w%ResultsEditAndCopyButtonWidth% h%SecondaryButt
|
|||||||
; Error Log Column
|
; Error Log Column
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
Gui, Add, Button, x+%MarginSize% y%MarginSize% w%ErrorLogEditBoxWidth% h%ButtonHeights% y%MarginSize%, Error Log
|
Gui, Add, Button, x+%MarginSize% y%MarginSize% w%ErrorLogEditBoxWidth% h%ButtonHeights% y%MarginSize% gOpenErrorLog, Error Log (Click to Open Detailed Log)
|
||||||
Gui, Add, Edit,x%ErrorLogEditBoxXPos% h%ErrorLogEditBoxHeight% w%ErrorLogEditBoxWidth% y+10, %ErrorLogVar%
|
Gui, Add, Edit,x%ErrorLogEditBoxXPos% h%ErrorLogEditBoxHeight% w%ErrorLogEditBoxWidth% y+10, %ErrorLogVar%
|
||||||
|
|
||||||
gui, font, Normal
|
gui, font, Normal
|
||||||
|
|||||||
@@ -100,6 +100,14 @@ Loop, 5 {
|
|||||||
sleep, 2000
|
sleep, 2000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; click the "Hide Links Preview" checkbox to hide previews of hyperlinks
|
||||||
|
if(InStr(VideoDescription, "https")){
|
||||||
|
Xpath = (//div[@class='hide-switcher-container'])[1]
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
; SaveOrPostProgress(Message:="Waiting Video to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
; SaveOrPostProgress(Message:="Waiting Video to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
Message = Uploading Video File
|
Message = Uploading Video File
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
@@ -112,6 +120,19 @@ if(Status){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; make sure the "Notify Users" checkbox is selected
|
||||||
|
Xpath = (//input[contains(@name,'is_do_promo')])[1]
|
||||||
|
|
||||||
|
try, Status := driver.findelementbyxpath(Xpath).isSelected()
|
||||||
|
if(Status = 0){
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=1000)
|
||||||
|
try, Status := driver.findelementbyxpath(Xpath).isSelected()
|
||||||
|
if(Status = "0"){
|
||||||
|
Message = Failed to Check ON the Notify Users Checkbox
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
; check if the "Auto Submit Post" checkbox is checked, and if not check it
|
; check if the "Auto Submit Post" checkbox is checked, and if not check it
|
||||||
js = return document.querySelector("#autosubmit_enabled").checked;
|
js = return document.querySelector("#autosubmit_enabled").checked;
|
||||||
try AutoSubmitstatus := driver.executeScript(js)
|
try AutoSubmitstatus := driver.executeScript(js)
|
||||||
@@ -288,9 +309,9 @@ Loop % VideoTitleArray.Length(){
|
|||||||
|
|
||||||
|
|
||||||
; get longest word in video title to use for grabbing the share link from the raw page
|
; get longest word in video title to use for grabbing the share link from the raw page
|
||||||
RegExMatch(VideoTitle, "ms)\b\S+(?CFindLongestWordInString)\b(?R)", m)
|
; RegExMatch(VideoTitle, "ms)\b\S+(?CFindLongestWordInString)\b(?R)", m)
|
||||||
LongestWordInVideoTitle := longestWord
|
; LongestWordInVideoTitle := longestWord
|
||||||
Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
; Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
||||||
|
|
||||||
; MsgBox, Longest word: %longestWord%`, #%wordLength%
|
; MsgBox, Longest word: %longestWord%`, #%wordLength%
|
||||||
|
|
||||||
@@ -299,9 +320,23 @@ Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
|||||||
|
|
||||||
; Grab Video Share Link From Page Source
|
; Grab Video Share Link From Page Source
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
|
ShareLink := GrabLocalsPostURLUsingTitle(VideoTitle)
|
||||||
|
|
||||||
|
if(!InStr(ShareLink, "https")){
|
||||||
|
Message = Couldn't find Video Share link in the first 10 posts. Is the video possibly still uploading?
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
|
||||||
|
; Msgbox % "ShareLink: " ShareLink
|
||||||
|
|
||||||
|
; Msgbox % "LocalsVideoURL: " LocalsVideoURL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Iterate over the last couple of posts, find the post with the title that contains the Longest word from the uploaded video
|
; Iterate over the last couple of posts, find the post with the title that contains the Longest word from the uploaded video
|
||||||
; And grab the share URL for it
|
; And grab the share URL for it
|
||||||
|
/*
|
||||||
Message = Looking for - %LongestWordInVideoTitle% - within first 7 posts in order to grab share URL
|
Message = Looking for - %LongestWordInVideoTitle% - within first 7 posts in order to grab share URL
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
@@ -358,6 +393,7 @@ loop, 7 {
|
|||||||
ShareLink :=
|
ShareLink :=
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
if(ShareLink = ""){
|
if(ShareLink = ""){
|
||||||
Message = Video was published succsessfully, but failed to grab Share Link.
|
Message = Video was published succsessfully, but failed to grab Share Link.
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
|||||||
@@ -247,9 +247,11 @@ 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
|
; Format text JS
|
||||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
|
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
||||||
|
|
||||||
|
; Input Description
|
||||||
js = document.getElementById('description').value = "%JSVideoDescription%";
|
js = document.getElementById('description').value = "%JSVideoDescription%";
|
||||||
try driver.executeScript(js)
|
try driver.executeScript(js)
|
||||||
|
|
||||||
@@ -331,7 +333,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|||||||
; Change GUI button from "Upload Podcast"
|
; Change GUI button from "Upload Podcast"
|
||||||
GuiControl,,UploadPodcast, Podcast Uploaded
|
GuiControl,,UploadPodcast, Podcast Uploaded
|
||||||
|
|
||||||
sleep, 5000
|
; sleep, 5000
|
||||||
|
|
||||||
CurrentSite :=
|
CurrentSite :=
|
||||||
ToolTip
|
ToolTip
|
||||||
|
|||||||
@@ -13,50 +13,81 @@ if(DiscordVideosWebhookURL = ""){
|
|||||||
Msgbox, Unable to Grab DiscordVideosWebhookURL from %SettingsIniFilepath%.`nPlease input the URL and then try again.
|
Msgbox, Unable to Grab DiscordVideosWebhookURL from %SettingsIniFilepath%.`nPlease input the URL and then try again.
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
; If description is longer than 2k chars, then API will error out. goto section that will allow user to edit video description to shorten it for posting
|
|
||||||
if(StrLen(SocialMediaDescription) > 2000 AND VideoDescriptionForVideosChannel = ""){
|
|
||||||
Goto, CreateDescriptionForVideosPosting
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
if(SocialMediaDescription = ""){
|
|
||||||
CreateDescriptionForSocialMedia()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SubmitDescriptionForDiscordVideosChannel:
|
|
||||||
Message := "**" . VideoTitle . "**" . "`n" . SocialMediaDescription . "`n"
|
|
||||||
; 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
|
||||||
|
|
||||||
if(BitChuteURL != "")
|
|
||||||
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
|
|
||||||
|
|
||||||
|
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(BitChuteURL){
|
||||||
|
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
||||||
|
if(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(BrighteonURL){
|
||||||
|
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 . ">) \| "
|
||||||
|
|
||||||
|
Clipboard := VideoLinks
|
||||||
|
Msgbox % "VideoLinks: " VideoLinks
|
||||||
|
|
||||||
|
|
||||||
UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
; StrLenOfDiscordMessage :=
|
||||||
|
|
||||||
|
; trim the video description if Title + Body + Links is longer than 2000 chars
|
||||||
|
if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(VideoLinks)) > 2000){
|
||||||
|
|
||||||
|
DiscordAPICharsLeft := 2000 - StrLen(VideoTitle) - StrLen(VideoLinks) - 15
|
||||||
|
|
||||||
|
DiscordVideoDescription := SubStr(VideoDescription, 1, DiscordAPICharsLeft) . "..."
|
||||||
|
}
|
||||||
|
else,
|
||||||
|
DiscordVideoDescription := VideoDescription
|
||||||
|
|
||||||
|
Message := "**" . VideoTitle . "**" . "`n" . VideoLinks . "`n" . DiscordVideoDescription
|
||||||
|
|
||||||
|
Status := UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
||||||
|
Message = API Response:`n%Status%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
|
||||||
SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|||||||
@@ -45,11 +45,33 @@ 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(BitChuteURL){
|
||||||
|
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(BrighteonURL){
|
||||||
|
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 . ") \| "
|
||||||
@@ -83,6 +105,11 @@ StrLenOfMessageAndVideoLinks := StrLen(TelegramVideoTitle) + StrLen(TelegramBody
|
|||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
if(StrLenOfMessageAndVideoLinks < 1024) {
|
if(StrLenOfMessageAndVideoLinks < 1024) {
|
||||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
||||||
|
|
||||||
|
; Output returned data to ErrorLog File
|
||||||
|
Message = API Response:`n%Status%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
if(InStr(Status, "error_code")){
|
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.
|
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
@@ -104,9 +131,16 @@ if(StrLenOfMessageAndVideoLinks < 4096){
|
|||||||
; Photo and Video Title go into SendPhoto
|
; Photo and Video Title go into SendPhoto
|
||||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||||
|
; Output returned data to ErrorLog File
|
||||||
|
Message = API Response:`n%Status%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
; Video Description goes into TelegramMessage
|
; Video Description goes into TelegramMessage
|
||||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
Status := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||||
|
; Output returned data to ErrorLog File
|
||||||
|
Message = API Response:`n%Status%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
|
||||||
} else, {
|
} else, {
|
||||||
; If Title, links and message are longer than 4096 chars, we need to split them into multiple messages
|
; If Title, links and message are longer than 4096 chars, we need to split them into multiple messages
|
||||||
@@ -126,7 +160,11 @@ Loop % VideoDescriptionChunks.Length(){
|
|||||||
Description := VideoDescriptionChunks[A_Index]
|
Description := VideoDescriptionChunks[A_Index]
|
||||||
|
|
||||||
|
|
||||||
SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
Status := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
||||||
|
; Output returned data to ErrorLog File
|
||||||
|
Message = API Response:`n%Status%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
; Clipboard := Description
|
; Clipboard := Description
|
||||||
; msgbox % Description
|
; msgbox % Description
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ try CurrentURL := driver.URL
|
|||||||
if(InStr(CurrentURL, "/login.php")){
|
if(InStr(CurrentURL, "/login.php")){
|
||||||
|
|
||||||
if(AutoLogin){
|
if(AutoLogin){
|
||||||
Message = Logging in Automatically by clicking into the UN+PW fields for info to register
|
Message = Trying to Log in Automatically by clicking into the UN+PW fields for info to register from Password Manager
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
; have to click into username and password field for page to register that there's input
|
; have to click into username and password field for page to register that there's input
|
||||||
@@ -39,11 +39,12 @@ if(InStr(CurrentURL, "/login.php")){
|
|||||||
js = document.querySelector("button[type='submit']").click();
|
js = document.querySelector("button[type='submit']").click();
|
||||||
driver.executeScript(js)
|
driver.executeScript(js)
|
||||||
|
|
||||||
|
|
||||||
; Do a double check to make sure that login worked
|
; Do a double check to make sure that login worked
|
||||||
Message = Checking Login Status
|
Message = Checking Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
sleep, 5000
|
||||||
|
|
||||||
try CurrentURL := driver.URL
|
try CurrentURL := driver.URL
|
||||||
|
|
||||||
if(!InStr(CurrentURL, "/upload")){
|
if(!InStr(CurrentURL, "/upload")){
|
||||||
@@ -67,11 +68,10 @@ if(InStr(CurrentURL, "/login.php")){
|
|||||||
sleep, 5000
|
sleep, 5000
|
||||||
}
|
}
|
||||||
|
|
||||||
; 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")
|
|
||||||
|
|
||||||
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)
|
||||||
@@ -84,6 +84,9 @@ if(Status){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Message = Inputting Video Information
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
; 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 {
|
||||||
@@ -117,30 +120,22 @@ Loop, 5 { ; Attempt to input video description a couple of times
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Input Primary Category
|
||||||
|
Xpath = (//input[@placeholder='- Primary category -'])[1]
|
||||||
|
try, driver.FindElementByXPath(Xpath).SendKeys("Podcasts").SendKeys(driver.Keys.ENTER)
|
||||||
; sleep, 5000
|
|
||||||
|
|
||||||
|
|
||||||
Message = Selecting Channel
|
Message = Selecting Channel
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; try driver.findElementsByID("channelId").item[1].click()
|
|
||||||
|
|
||||||
; @todo replace with regex
|
; @todo replace with regex
|
||||||
js = return document.querySelector("#channelId").innerHTML;
|
js = return document.querySelector("#channelId").innerHTML;
|
||||||
try, ChannelIDNumber := driver.executeScript(js)
|
try, ChannelIDNumber := driver.executeScript(js)
|
||||||
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
||||||
ChannelIDNumber := StrSplit(ChannelIDNumber, "option value=")
|
ChannelIDNumber := StrSplit(ChannelIDNumber, "option value=")
|
||||||
|
|
||||||
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
|
||||||
|
|
||||||
ChannelIDNumber := ChannelIDNumber[3]
|
ChannelIDNumber := ChannelIDNumber[3]
|
||||||
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
|
||||||
|
|
||||||
SingleQuote = "
|
SingleQuote = "
|
||||||
ChannelIDNumber := StrSplit(ChannelIDNumber, "data-private")
|
ChannelIDNumber := StrSplit(ChannelIDNumber, "data-private")
|
||||||
ChannelIDNumber := ChannelIDNumber[1]
|
ChannelIDNumber := ChannelIDNumber[1]
|
||||||
|
|||||||
59
README.md
59
README.md
@@ -1,16 +1,28 @@
|
|||||||
# Freedomain-Video-Uploader
|
# Automated Video and Podcast Uploading to Multiple Sites using Autohotkey, Selenium, and Platform APIs
|
||||||
|
|
||||||
Video Uploader written for the [Freedomain Philosophy Show](https://freedomain.com/)
|

|
||||||
|
|
||||||

|
# Supported Platforms
|
||||||
|
| Platform | Upload Type |
|
||||||
|
|--|--|--|
|
||||||
|
| Locals | Video Upload w/Selenium |
|
||||||
|
| Bitchute | Video Upload w/Selenium |
|
||||||
|
| Rumble | Video Upload w/Selenium |
|
||||||
|
| DailyMotion | Video Upload w/Selenium |
|
||||||
|
| Brighteon | Video Upload w/Selenium |
|
||||||
|
| Odysee | Video + Audio Upload w/LBRY API |
|
||||||
|
| FDRPodcasts | Podcast w/Selenium |
|
||||||
|
| Discord | Announcement w/API |
|
||||||
|
| Telegram | Announcement w/API |
|
||||||
|
|
||||||
|
## Other Features
|
||||||
## Features
|
- Install Uploader Updates from Gitea automatically
|
||||||
Automated posting to the following media platform using either the Platform's API or Selenium Chrome automation.
|
- Install Chrome Updates from chromium.org automatically
|
||||||
|
- Schedule Posts for a later date & time
|
||||||
|**Locals**|**Bitchute**|**Rumble**|**DailyMotion**|**Brighteon**|**Odysee**
|
- Log Errors to a Discord Channel using webhook
|
||||||
|--|--|--|--|--|--|
|
- Discord Ping on Upload Completion
|
||||||
|Selenium|Selenium|Selenium|Selenium|Selenium|LBRY API
|
- Setting to confirm an upload before it's published
|
||||||
|
- Setting to show Tooltip progress at top of the screen showing current action being executed
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
1. Install .Net Framework 3.5
|
1. Install .Net Framework 3.5
|
||||||
@@ -28,14 +40,11 @@ Automated posting to the following media platform using either the Platform's AP
|
|||||||
- When run, the Uploader will automatically create the folders and files it requires in the same directory it's run from.
|
- When run, the Uploader will automatically create the folders and files it requires in the same directory it's run from.
|
||||||
|
|
||||||
# Using Portable Version of Chrome
|
# Using Portable Version of Chrome
|
||||||
Using a portable version of Chrome will give you full control over chrome and chromedriver updates.
|
Using Selenium with a portable `Chrome for Testing` version of Chrome is the preferred way of uploading as it gives you full control over chrome and chromedriver updates and when to install them.
|
||||||
|
- When running the uploader for the first time, you will be notified that `Chrome for Testing` was not found and that you can download it by clicking the `Chrome Up to Date` button. This will automatically get the latest version of Chrome and download + extract it to the the `\lib\` folder. It will also download the appropriate `chromedriver.exe` file for that version and prompt you for admin permission to move it to `C:\Program Files\SeleniumBasic\chromedriver.exe`.
|
||||||
|
|
||||||
The Uploader will check for a portable version of Chrome first, before defaulting to the system installation
|
# Windows Defender False Positive
|
||||||
|
Windows Defender will sometimes flag the compiled .exe version as a false positive. The easiest way to get around this is to whitelist the directory the folder where you're keeping the Uploader files in. To do this, open up `Windows Powershell` as Administrator and run the following command: `Add-MpPreference -ExclusionPath "PATHTOTHEFOLDER"`, eg: `Add-MpPreference -ExclusionPath "C:\Users\yuriy\Downloads\VideoUploader"`
|
||||||
1. To use a portable version of Chrome, download the latest version Chrome version that has a chromedriver from [Chrome-for-Testing](https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json), extract the `chrome-win64.zip` file and move the extracted folder to the `\Lib\` directory:
|
|
||||||
The resulting chrome filepath should be `..\Freedomain-Video-Uploader-Folder\Lib\chrome-win64\chrome.exe`
|
|
||||||
|
|
||||||
2. Download the `win64` chromedriver for the same version and move it to `C:\Program Files\SeleniumBasic\chromedriver.exe`
|
|
||||||
|
|
||||||
# Settings File
|
# Settings File
|
||||||
The Uploader reads & saves its settings to a `settings.ini` file, All customization, including custom profile URLs are stored here.
|
The Uploader reads & saves its settings to a `settings.ini` file, All customization, including custom profile URLs are stored here.
|
||||||
@@ -72,8 +81,8 @@ You can select a different file in the main window if the auto selection does no
|
|||||||
|
|
||||||
|
|
||||||
# LBRY Desktop Application `daemon_settings.yml`
|
# LBRY Desktop Application `daemon_settings.yml`
|
||||||
Due to LBRY being discontinued, the default daemon_settings that come with the LBRY Desktop application might no longer work for you due to the servers being offline.
|
Due to the LBRY Video Platform being discontinued, the default daemon_settings that come with the LBRY Desktop application might no longer work for you due to the servers being offline.
|
||||||
To fix this, add the Odysee server to the top of the list of `lbryum_servers` in the following file: `C:\Users\YOURUSERNAMEHERE\AppData\Local\lbry\lbrynet\daemon_settings.yml`
|
To fix this, add the Odysee server to the top of the list of `lbryum_servers` in the following file: `C:\Users\YOURUSERNAMEHERE\AppData\Local\lbry\lbrynet\daemon_settings.yml` [Source](https://www.reddit.com/r/lbry/comments/11zwtmj/is_lbry_down/)
|
||||||
```
|
```
|
||||||
lbryum_servers:
|
lbryum_servers:
|
||||||
- a-hub1.odysee.com:50001
|
- a-hub1.odysee.com:50001
|
||||||
@@ -92,7 +101,13 @@ I have done my best to catch any possible errors that might pop up and write fun
|
|||||||
2. `git clone` the project and then either run the `Compile Uploader to EXE.ahk` autohotkey script to automatically compile, or start up the AHK compiler that comes installed with Autohotkey and select the `Freedomain Video Uploader.ahk` and `\Assets\FreedomainVideo.ico` icon.
|
2. `git clone` the project and then either run the `Compile Uploader to EXE.ahk` autohotkey script to automatically compile, or start up the AHK compiler that comes installed with Autohotkey and select the `Freedomain Video Uploader.ahk` and `\Assets\FreedomainVideo.ico` icon.
|
||||||
|
|
||||||
|
|
||||||
# Extra Tools
|
# Helper Tools
|
||||||
## LBRY-Process-Killer
|
The following tools will be automatically downloaded from Gitea as needed in order to do the following actions.
|
||||||
|
|
||||||
Autohotkey script that continuously reads the lbrynet.log for when your videos are fully uploaded/seeded to lbry and then kills the LBRY process.
|
## LBRY-Process-Killer
|
||||||
|
Program that continuously reads the lbrynet.log for when your videos are fully uploaded/seeded to lbry and then kills the LBRY process. This can be be disabled using the `Kill LBRY after Uploading` checkbox on the main screen
|
||||||
|
|
||||||
|
## Post Scheduler
|
||||||
|
Program that continually checks the `Scheduled Posts` folder and automatically starts the Uploader with the specific video/post at the specified scheduled time.
|
||||||
|
|
||||||
|
##
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
[Video-Uploader]
|
[Video-Uploader]
|
||||||
Version=3.37
|
Version=3.43
|
||||||
Name=Freedomain Video Uploader
|
Name=Freedomain Video Uploader
|
||||||
|
APIURL=
|
||||||
Reference in New Issue
Block a user