0

I am scraping a page with CasperJS that is using RichFaces to trigger a download. So far I have been unsuccessful with trying to capture the network requests and wanted to try something else.

Is there any way to extract the target URL from all the things going on in a RichFaces onClick event on an anchor tag in the DOM?

I did find this question here downloading a file that comes as an attachment in a POST request response in PhantomJs about modifying a form submission with casperJS but unfortunately this RichFaces event is not part of a form

Vasil Lukach
  • 3,658
  • 3
  • 31
  • 40
AdrianLoer
  • 624
  • 3
  • 11
  • What do you need the URL for? (I assume you mean the POST parameters). Other than simply copying the code that is used to create them I don't see how you'd do it. – Makhiel Jun 09 '17 at 09:01
  • I am trying to download a pdf file that can be downloaded via the normal browser dl dialog after clicking on a richfaces anchor link. I do not really understand what is going on with richfaces so that I have no idea how to download this – AdrianLoer Jun 09 '17 at 20:08
  • forgot to mention, the requests I can observe in the browser (2 posts, second one contains the pdf) do not appear in casperjs, I am logging *everything* and I can see all other requests except these – AdrianLoer Jun 09 '17 at 20:09
  • Can't help with CasperJS; and I'm still not sure I follow, if you want to get a URL like `example.com/downloads/file.pdf` you can't. – Makhiel Jun 12 '17 at 09:16

0 Answers0