Reworked Brighteon Login Check
This commit is contained in:
@@ -3048,20 +3048,31 @@ try CurrentTab := driver.url
|
|||||||
if(InStr(CurrentTab, "login")) ; we're logged out
|
if(InStr(CurrentTab, "login")) ; we're logged out
|
||||||
{
|
{
|
||||||
|
|
||||||
Message = Closing out of any popups that might appear
|
Message = Closing out of any popups that might appear on loin page
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
; loop, 2 {
|
|
||||||
Xpath = //body/div[@id='__next']/div[@id='modal-root']/div[2]/div[1]/div[1]//*[local-name()='svg']
|
Xpath = //body/div[@id='__next']/div[@id='modal-root']/div[2]/div[1]/div[1]//*[local-name()='svg']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100)
|
||||||
|
|
||||||
Xpath = //body/div[@id='__next']/div[@id='modal-root']/div/div/div[1] ; get our free newsletter
|
Xpath = //body/div[@id='__next']/div[@id='modal-root']/div/div/div[1] ; get our free newsletter
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100)
|
||||||
|
|
||||||
; try driver.FindElementByXPath(Xpath).click()
|
|
||||||
|
|
||||||
; If newsletter pop up exists then close it.
|
; If newsletter pop up exists then close it.
|
||||||
Xpath = //div[@class='overlay__close inside']
|
Xpath = //div[@class='overlay__close inside']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100)
|
||||||
|
|
||||||
|
|
||||||
|
; Try clicking the login button, sometimes this will auto log you back in without having to input credentials
|
||||||
|
xpath = //a[normalize-space()='Log In']
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100)
|
||||||
|
DevModeMsgBox(Status)
|
||||||
|
|
||||||
|
|
||||||
|
Message = Checking Login Status
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
try PageURL := driver.url
|
||||||
|
if(InStr(PageURL, "auth.brighteon.com/login?state")){ ; we're logged out and need to manually log back in
|
||||||
|
|
||||||
|
|
||||||
if(AutoLogin){
|
if(AutoLogin){
|
||||||
@@ -3091,8 +3102,9 @@ if(InStr(CurrentTab, "login")) ; we're logged out
|
|||||||
SaveDriverURLOFErrorPage()
|
SaveDriverURLOFErrorPage()
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Navigate to Upload Page
|
; Navigate to Upload Page
|
||||||
|
|||||||
Reference in New Issue
Block a user