|
Post by cyrilmadrid on Apr 28, 2015 21:04:54 GMT
I am trying to analyse my book in R, and this is easy as long as I download the book manually. But I would like to be able to do that automatically on a dailly basis. I was trying to log in within the script using R package httr and authenticate, but I have a problem with the 2 layers of passwords (the question after the password).
Has anyone managed to automate the downloading of his book ?
|
|
|
Post by cyrilmadrid on Apr 28, 2015 21:35:19 GMT
It seems that just passing email+password, and not the answer to the additional question, I'm connected !
Response [https://www.assetzcapital.co.uk/login] Date: 2015-04-28 22:59 Status: 200
A priori Status 200 means I am connected.
Any idea how to get a copy of my loans from there ?
|
|
|
Post by chris on Apr 28, 2015 22:10:28 GMT
It seems that just passing email+password, and not the answer to the additional question, I'm connected ! Response [https://www.assetzcapital.co.uk/login] Date: 2015-04-28 22:59 Status: 200 A priori Status 200 means I am connected. Any idea how to get a copy of my loans from there ? You'll need to check but I believe the content of the page is overwritten with the security question regardless of the URL so you could still need to answer that question even though you got a 200 response. Whilst we've not done any work to make what you're trying to do easy, we've not done anything to make it difficult either. You should be able to login by submitting a couple of forms (HTTP POST requests), one for the login details and one for the security question. You can then fire a GET request for the content you want. You need to make sure cookies are persisted between requests though to make sure the site can track your session and keep you logged in.
|
|
bigfoot12
Member of DD Central
Posts: 1,817
Likes: 816
|
Post by bigfoot12 on Apr 29, 2015 8:39:56 GMT
chris, any update on the expected time of the API. Presumably this sort of thing will become easier then. Although I think that you said we might have to log in first .(I might have dreamt that.)
|
|
|
Post by chris on Apr 29, 2015 9:15:46 GMT
chris, any update on the expected time of the API. Presumably this sort of thing will become easier then. Although I think that you said we might have to log in first .(I might have dreamt that.) No ETA just yet. It's on my top 10 to do list but seems permanently stuck around item 6 or 7 as other items get prioritised ahead of it. The basic framework is in place, I want to change the way sessions are handled to a unified system behind the scenes, and then it's just a case of fleshing out the end points. So it's not a lot of work to start getting the basics fully API'd up but it's not been given any resources yet. If it doesn't happen in Q2 in at least a very basic form then I'm going to start getting grumpy so it should see progress soon.
|
|
|
Post by cyrilmadrid on May 1, 2015 15:15:31 GMT
It seems that just passing email+password, and not the answer to the additional question, I'm connected ! Response [https://www.assetzcapital.co.uk/login] Date: 2015-04-28 22:59 Status: 200 A priori Status 200 means I am connected. Any idea how to get a copy of my loans from there ? You'll need to check but I believe the content of the page is overwritten with the security question regardless of the URL so you could still need to answer that question even though you got a 200 response. Whilst we've not done any work to make what you're trying to do easy, we've not done anything to make it difficult either. You should be able to login by submitting a couple of forms (HTTP POST requests), one for the login details and one for the security question. You can then fire a GET request for the content you want. You need to make sure cookies are persisted between requests though to make sure the site can track your session and keep you logged in. The problem with the security question is that there are several possible questions... so not sure how to pass the answer...
|
|
|
Post by chris on May 1, 2015 15:18:27 GMT
You'll need to check but I believe the content of the page is overwritten with the security question regardless of the URL so you could still need to answer that question even though you got a 200 response. Whilst we've not done any work to make what you're trying to do easy, we've not done anything to make it difficult either. You should be able to login by submitting a couple of forms (HTTP POST requests), one for the login details and one for the security question. You can then fire a GET request for the content you want. You need to make sure cookies are persisted between requests though to make sure the site can track your session and keep you logged in. The problem with the security question is that there are several possible questions... so not sure how to pass the answer... You'd need to parse the content of the page to see which question is being asked. Or you could set all the questions to have the same answer (if the site lets you), although that devalues their utility.
|
|