-2

Today I want to know how to get image URL from webSite, I already read some questions and answers but they're not quite perfect for me.

The problem is, when I enter the site, there are some images. It's pretty easy that I get image URl by UI, But, it's really hard that I get image URL by Java Servlet and jsp. Sometimes, some image url is in only networks!

For example, http://map.daum.net/ <-- this site. Enter the site, and see 'RoadView'. When you see Codes in Chrome(F12), there are no image sources in jsp codes. Only you can see in Networks!

How can I get image URL(source)? Is it possible?

ps. I can get image source using mouse and right click, but I want to get image source using java automatically :), so please do not write user's perspective.

ps2. I'm not very well using English, so there are so many mistakes and something like rude. I apologize for that.

Joogon Go
  • 11
  • 4
  • First, it's hard to find "RoadView" on that site, it's in Korean. You probably don't see the image in the source page because it's dynamically loaded in AJAX manner. Still, what does it have to do with servlets and jsp? Are you trying to parse the html code of this website? What are you trying to do? – nolexa Feb 04 '16 at 02:00
  • @nolexa I'm trying to get image from other jsp(or site). First, get image source from web site. Then, show that image from other site. In servlet or jsp, get 'URL' from the site. Before parsing, I can't approach the image source url...:( – Joogon Go Feb 04 '16 at 02:03
  • You want to write code that gets a web page from that web site you mentioned, and you want this code to extract an image from this web page. Is that correct? – nolexa Feb 04 '16 at 02:08
  • @nolexa Yeah.....it's quite same, but I only want to extract url. but it's not different to extract image. I thought that it's easy because I thought only using 'request.getRequestURL' , but because image is in network(server?), I couldn't. – Joogon Go Feb 04 '16 at 02:18
  • It is not clear what your question has to do with `java`, `jsp`, and `servlets`. You probably have to remove these tags. You did not explain what **programming** task you are trying to accomplish, using what programming tools, and what was your **programming** effort so far. – nolexa Feb 04 '16 at 02:42

1 Answers1

0

So, what you want to do is to scrape a dynamic content of the page to extract some dynamically loaded data (an image url) from it. You did not tell us what programming language or environment you want to use. However, similar questions have been asked before, for instance this one: How to scrape ajax loaded content with jsoup. There are two frameworks named in the answers to this question: PhantomJS and CasperJS. Both are JavaScript frameworks.

Community
  • 1
  • 1
nolexa
  • 2,392
  • 2
  • 19
  • 19