Explorar o código

[changed] Try to get the workflow ID from the form, it might help with #3.

TnS-hun %!s(int64=6) %!d(string=hai) anos
pai
achega
00977e0934
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      kobo-book-downloader/Kobo.py

+ 1 - 1
kobo-book-downloader/Kobo.py

@@ -153,7 +153,7 @@ class Kobo:
 		parsed = urllib.parse.urlparse( signInUrl )
 		koboSignInUrl = parsed._replace( query = None, path = "/ww/en/signin/signin/kobo" ).geturl()
 
-		match = re.search( r'href="/ww/en/signin/signin/kobo\?workflowId=([^"]+)"', htmlResponse )
+		match = re.search( r""" name="LogInModel.WorkflowId" type="hidden" value="([^"]+)" />""", htmlResponse )
 		if match is None:
 			raise KoboException( "Can't find the workflow ID in the login form. The page format might have changed." )
 		workflowId = html.unescape( match.group( 1 ) )