#NEWLINE# def __init__( self , session = None ) : #NEWLINE# #INDENT# self . packtPubUrl = 'https://www.packtpub.com' #NEWLINE# self . myBooksUrl = 'https://www.packtpub.com/account/my-ebooks' #NEWLINE# self . loginUrl = 'https://www.packtpub.com/register' #NEWLINE# ( self . myPacktEmail , self . myPacktPassword ) = self . getLoginData ( 'configFile.cfg' ) #NEWLINE# ( self . downloadFolderPath , self . downloadFormats , self . downloadBookTitles ) = self . getDownloadData ( 'configFile.cfg' ) #NEWLINE# if ( not os . path . exists ( self . downloadFolderPath ) ) : #NEWLINE# #INDENT# print ( ( ( "[ERROR] Download folder path: '" + self . downloadFolderPath ) + "' doesn't exist" ) ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# self . session = session #NEWLINE# if ( session . session is None ) : #NEWLINE# #INDENT# self . createSession ( ) #NEWLINE# #UNINDENT# self . bookData = None