Found an example of a similar login (available on github repo):
calibre/recipes/hbr.recipe
Code:
rq = Request(rurl, headers={
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Referer': url,
'X-Requested-With': 'XMLHttpRequest',
}, data=urlencode({'username': self.username, 'password': self.password,'deviceid':deviceid, 'persistent':'on'}))
Looks like it's working now, will get it tidied up & then submit it.
Regards,
Leo