add force retry if first try fails, in cookie stealing
This commit is contained in:
@@ -29,7 +29,7 @@ def findDefaultProfile(path):
|
||||
else:
|
||||
return target
|
||||
|
||||
def getCookiesFromBrowser(url):
|
||||
def getCookiesFromBrowser(url,force=False):
|
||||
DBFILE = "../db/sqlite3.db"
|
||||
if os.name == 'posix':
|
||||
homePath = os.path.expanduser('~')
|
||||
@@ -63,7 +63,7 @@ def getCookiesFromBrowser(url):
|
||||
cookie += ";"
|
||||
|
||||
print("Cookies:",cookie)
|
||||
if cookie == '':
|
||||
if cookie == '' and force == False:
|
||||
if os.name == 'posix':
|
||||
webbrowser.register("firefox",None,webbrowser.BackgroundBrowser("firefox"))
|
||||
webbrowser.get('firefox').open(url)
|
||||
|
||||
Reference in New Issue
Block a user