Skip to content

Commit 5b84b38

Browse files
committed
Release 0.10.0
1 parent 1a25f5f commit 5b84b38

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

kobodl/kobo.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ def __WaitTillActivation(self, activationCheckUrl) -> Tuple[str, str]:
8585
return jsonResponse["UserEmail"], jsonResponse["UserId"], jsonResponse["UserKey"]
8686

8787
def __ActivateOnWeb(self) -> Tuple[str, str]:
88-
print( "Initiating web-based activation" )
88+
print("Initiating web-based activation")
8989

9090
params = {
9191
"pwspid": Kobo.DefaultPlatformId,
9292
"wsa": Kobo.Affiliate,
9393
"pwsdid": self.user.DeviceId,
9494
"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...
9696
"pwspos": Kobo.DeviceOs,
9797
"pwspov": Kobo.DeviceOsVersion,
9898
}
@@ -300,8 +300,8 @@ def __DownloadAudiobook(self, url, outputPath: str) -> None:
300300
f.write(chunk)
301301

302302
@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))
305305
return id.lower()
306306

307307
# PUBLIC METHODS:
@@ -467,7 +467,7 @@ def LoadInitializationSettings(self) -> None:
467467
print(response.reason, response.text)
468468
raise err
469469

470-
def Login( self ) -> None:
470+
def Login(self) -> None:
471471
activationCheckUrl, activationCode = self.__ActivateOnWeb()
472472

473473
print("")
@@ -477,10 +477,12 @@ def Login( self ) -> None:
477477
print("")
478478
print(f"Open https://www.kobo.com/activate and enter {activationCode}.")
479479
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+
)
481483
print("")
482484

483-
userEmail, userId, userKey = self.__WaitTillActivation( activationCheckUrl )
485+
userEmail, userId, userKey = self.__WaitTillActivation(activationCheckUrl)
484486
print("")
485487

486488
# We don't call Settings.Save here, AuthenticateDevice will do that if it succeeds.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ multi_line_output = 3
1212

1313
[tool.poetry]
1414
name = "kobodl"
15-
version = "0.9.4"
15+
version = "0.10.0"
1616
description = "Kobo Book Downloader"
1717
authors = ["Brandon Davis <[email protected]>"]
1818
license = "Unlicense"

0 commit comments

Comments
 (0)