Skip to content

Commit

Permalink
[changed] Try to get the workflow ID from the form, it might help with
Browse files Browse the repository at this point in the history
  • Loading branch information
TnS-hun committed Apr 29, 2019
1 parent fcb0d43 commit 00977e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kobo-book-downloader/Kobo.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def __GetExtraLoginParameters( self ) -> Tuple[ str, str, str ]:
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 ) )
Expand Down

0 comments on commit 00977e0

Please sign in to comment.