Sfoglia il codice sorgente

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

TnS-hun 6 anni fa
parent
commit
00977e0934
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 ) )