@@ -85,14 +85,14 @@ def __WaitTillActivation(self, activationCheckUrl) -> Tuple[str, str]:
85
85
return jsonResponse ["UserEmail" ], jsonResponse ["UserId" ], jsonResponse ["UserKey" ]
86
86
87
87
def __ActivateOnWeb (self ) -> Tuple [str , str ]:
88
- print ( "Initiating web-based activation" )
88
+ print ("Initiating web-based activation" )
89
89
90
90
params = {
91
91
"pwspid" : Kobo .DefaultPlatformId ,
92
92
"wsa" : Kobo .Affiliate ,
93
93
"pwsdid" : self .user .DeviceId ,
94
94
"pwsav" : Kobo .ApplicationVersion ,
95
- "pwsdm" : Kobo .DefaultPlatformId , # In the Android app this is the device model but Nickel sends the platform ID...
95
+ "pwsdm" : Kobo .DefaultPlatformId , # In the Android app this is the device model but Nickel sends the platform ID...
96
96
"pwspos" : Kobo .DeviceOs ,
97
97
"pwspov" : Kobo .DeviceOsVersion ,
98
98
}
@@ -300,8 +300,8 @@ def __DownloadAudiobook(self, url, outputPath: str) -> None:
300
300
f .write (chunk )
301
301
302
302
@staticmethod
303
- def __GenerateRandomHexDigitString ( length : int ) -> str :
304
- id = "" .join ( secrets .choice ( string .hexdigits ) for _ in range ( length ) )
303
+ def __GenerateRandomHexDigitString (length : int ) -> str :
304
+ id = "" .join (secrets .choice (string .hexdigits ) for _ in range (length ) )
305
305
return id .lower ()
306
306
307
307
# PUBLIC METHODS:
@@ -467,7 +467,7 @@ def LoadInitializationSettings(self) -> None:
467
467
print (response .reason , response .text )
468
468
raise err
469
469
470
- def Login ( self ) -> None :
470
+ def Login (self ) -> None :
471
471
activationCheckUrl , activationCode = self .__ActivateOnWeb ()
472
472
473
473
print ("" )
@@ -477,10 +477,12 @@ def Login( self ) -> None:
477
477
print ("" )
478
478
print (f"Open https://www.kobo.com/activate and enter { activationCode } ." )
479
479
print ("" )
480
- print ("kobo-book-downloader will wait now and periodically check for the activation to complete." )
480
+ print (
481
+ "kobo-book-downloader will wait now and periodically check for the activation to complete."
482
+ )
481
483
print ("" )
482
484
483
- userEmail , userId , userKey = self .__WaitTillActivation ( activationCheckUrl )
485
+ userEmail , userId , userKey = self .__WaitTillActivation (activationCheckUrl )
484
486
print ("" )
485
487
486
488
# We don't call Settings.Save here, AuthenticateDevice will do that if it succeeds.
0 commit comments