getting past cookies when downloading data from the web

Andy Bevan and I are a bit stuck with using R for downloading a PDF from the UK Archaeology Data Service. The details of our struggle are here: http://stackoverflow.com/questions/34623816/using-r-to-accept-cookies-to-download-a-pdf-file

Any solutions would be much appreciated!

thanks,

Ben

See if this helps http://stackoverflow.com/a/34624657/1457051

1 Like

Thanks @hrbrmstr - I don’t often deal with cookies, so don’t have much insight here

1 Like

Thanks! RSelenium is a great way around this, thanks again.

It seems to me that the root of the issue here was more the js evaluation
than the cookies, although of course both were required. That was an
incredibly informative thread. Thanks for sharing, and for the SO
responses.

Matt

Just to add for future problem analysis: httr manages cookies autamatically by default - so, cookies should never ever be the problem.

We have another answer by email from John Harrison (the rselenium package maintainer), who managed to identify the exact name of the cookie we need to accept. I’ve added it to the stackoverflow post.

1 Like