0

I'd like to retrieve content from an iframe via jsoup but get the following error message: "your browser does not support inline frames or is currently configured not to display inline frames ..."

Code:

Jsoup.connect(URL).userAgent(USER_AGENT).get().getElementById(ID);

I have also tried using java.net.URLConnection and Apache HttpClient. I suppose there is something wrong with the user agent which is currently

Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36

but no clue how to fix this ...

werwuifi
  • 367
  • 1
  • 4
  • 15

1 Answers1

-1

I can't test right now, but you may try to set the UserAgent in Jsoup to a string of a known browser that supports iframes.

see JSoup UserAgent, how to set it right?

Or try to get the source of the iframe directly, as explained in this SO Traverse Iframe using jsoup

luksch
  • 11,497
  • 6
  • 38
  • 53