Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dbdefc5a95 | |||
| 613f9d222a | |||
| f3817cb9f9 | |||
| 478f8f769e | |||
| 1b856287df | |||
| 45e2d2b0f0 |
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
|
||||||
|
|
||||||
|
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
|||||||
|
|
||||||
; check the status of the Bitchute URL to see if it's done processing
|
; check the status of the Bitchute URL to see if it's done processing
|
||||||
; shows "404 - Page not found" on page if not
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(BitChuteURL){
|
||||||
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
||||||
if(BitChuteURL != "")
|
if(BitChuteURL != "")
|
||||||
VideoLinks .= "[BitChute](<" . BitChuteURL . ">) \| "
|
VideoLinks .= "[BitChute](<" . BitChuteURL . ">) \| "
|
||||||
@@ -32,9 +33,12 @@ else, {
|
|||||||
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
||||||
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
; check the status of the Brighteon URL to see if it's done processing
|
; check the status of the Brighteon URL to see if it's done processing
|
||||||
; shows "404 - Page not found" on page if not
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(BrighteonURL){
|
||||||
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
||||||
if(BrighteonURL != "")
|
if(BrighteonURL != "")
|
||||||
VideoLinks .= "[Brighteon](<" . BrighteonURL . ">) \| "
|
VideoLinks .= "[Brighteon](<" . BrighteonURL . ">) \| "
|
||||||
@@ -43,7 +47,7 @@ else, {
|
|||||||
ErrorLogMsg = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
ErrorLogMsg = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
||||||
SaveOrPostProgress(Message:=ErrorLogMsg,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=ErrorLogMsg,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(OdyseeVideoURL != "")
|
if(OdyseeVideoURL != "")
|
||||||
VideoLinks .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
VideoLinks .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||||
@@ -63,6 +67,9 @@ VideoLinks .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
|||||||
if(PodcastNumber != "")
|
if(PodcastNumber != "")
|
||||||
VideoLinks .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
VideoLinks .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||||
|
|
||||||
|
Clipboard := VideoLinks
|
||||||
|
Msgbox % "VideoLinks: " VideoLinks
|
||||||
|
|
||||||
|
|
||||||
; StrLenOfDiscordMessage :=
|
; StrLenOfDiscordMessage :=
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ LineBreakChar = `%0A ; Used for API
|
|||||||
|
|
||||||
; check the status of the Bitchute URL to see if it's done processing
|
; check the status of the Bitchute URL to see if it's done processing
|
||||||
; shows "404 - Page not found" on page if not
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(BitChuteURL){
|
||||||
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
||||||
if(BitChuteURL != "")
|
if(BitChuteURL != "")
|
||||||
VideoLinks .= "[BitChute](" . BitChuteURL . ") \| "
|
VideoLinks .= "[BitChute](" . BitChuteURL . ") \| "
|
||||||
@@ -57,10 +58,11 @@ else, {
|
|||||||
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
||||||
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
; check the status of the Brighteon URL to see if it's done processing
|
; check the status of the Brighteon URL to see if it's done processing
|
||||||
; shows "404 - Page not found" on page if not
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(BrighteonURL){
|
||||||
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
||||||
if(BrighteonURL != "")
|
if(BrighteonURL != "")
|
||||||
VideoLinks .= "[Brighteon](" . BrighteonURL . ") \| "
|
VideoLinks .= "[Brighteon](" . BrighteonURL . ") \| "
|
||||||
@@ -69,7 +71,7 @@ else, {
|
|||||||
LogMessage = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
LogMessage = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
||||||
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(OdyseeVideoURL != "")
|
if(OdyseeVideoURL != "")
|
||||||
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Automated Video and Podcast Uploading to Multiple Sites using Autohotkey, Selenium, and Platform APIs
|
# Automated Video and Podcast Uploading to Multiple Sites using Autohotkey, Selenium, and Platform APIs
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
# Supported Platforms
|
# Supported Platforms
|
||||||
| Platform | Upload Type |
|
| Platform | Upload Type |
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
[Video-Uploader]
|
[Video-Uploader]
|
||||||
Version=3.40
|
Version=3.43
|
||||||
Name=Freedomain Video Uploader
|
Name=Freedomain Video Uploader
|
||||||
|
APIURL=
|
||||||
Reference in New Issue
Block a user