1

I have encountered one little problem. I have no idea how to harvest data from website that are result of some function or something. I know only Java, no idea how this other stuff works so idk how, or even if is it possible.

Thing is, this one website don't show text I'm interested in as text but rather take that text and put it into image as .png.

I would like to save this image or do something with it but I don't know how to save/access/take/work_with/point_bot_on it since it is not stored there as image but as some action.

This is problematic line:

<img src="https://www.example.com/create-image.php?width=290&amp;text=sufPX6l9UqgWD9nYUKgofAoj1sIkTrOoniENZWApbZ0=" alt="">

See that "/create-image.php"? Is there way I could still get that image, considering I'm using Jsoup? Or perhaps, decipher/de-hash/de-something text part?

I've tried various online tools to try to make that text part text but without result. And I have tried to get that img by just copying URL and then tried to visit it and get it from there, not original website ...as well without result.

When I move cursor over that line in browser's inspector I see this image but I'm not into doing it manually :D :)

I would like to ask, how would you get to this image?

Thanks :))

taha
  • 722
  • 7
  • 15
areobah
  • 11
  • 1
  • Do you know what language you're using? Java and javascript are not the same language. Please delete one of the tags. – NomadMaker Nov 01 '20 at 11:17
  • That **URL** does ***not*** have any images on it. – Y2020-09 Nov 01 '20 at 11:29
  • @NomadMaker of course, I am using Java, JavaScript I thought is in website, or is it just php in this case? I have no idea about this stuff. – areobah Nov 01 '20 at 11:35
  • @Y2020-09 Yes, it does not. This is just example how it looks :) – areobah Nov 01 '20 at 11:36
  • Here is a good [SO Answer](https://stackoverflow.com/questions/12465586/how-can-i-download-an-image-using-jsoup), and [another](https://stackoverflow.com/questions/14541740/java-program-to-download-images-from-a-website-and-display-the-file-sizes), and [another](https://stackoverflow.com/questions/30017067/how-to-extract-image-urls-using-jsoup) – Y2020-09 Nov 01 '20 at 11:43
  • The **URL** you have provided ***DOES NOT*** contain an image! – Y2020-09 Nov 01 '20 at 11:45
  • Just because it's a web site doesn't mean you should use the javascript tag. Please remove it. – NomadMaker Nov 01 '20 at 11:50
  • @Y2020-09 exactly, it does not contain image when you look at it from link in – areobah Nov 01 '20 at 11:57
  • Maybe you need to simulate a whole web browser which executes Javascript to generate the whole website. Selenium might be helpful here. – Stefan Nov 01 '20 at 12:08
  • @Stefan I'm gonna check that out, thanks :) – areobah Nov 01 '20 at 12:08
  • I think your best bet, if it is just that one image, is to use the ***right click*** option in your browser... :) :D – Y2020-09 Nov 01 '20 at 13:06
  • @Y2020-09 oh, how I wish it was just one image :D – areobah Nov 01 '20 at 13:13
  • @Y2020-09 I do not understand what you mean. Could you elaborate? – areobah Nov 01 '20 at 13:17
  • Come on dude... You need to read stuff first, make some progress, and then when you get stuck ask what is going on. The page that I just linked has a ton of documentation explaining what is going on. I said to `Cut & Paste` the method body, and when it has compiled, see if you can download your image. Make sure to include the proper `import java...` statements. – Y2020-09 Nov 01 '20 at 13:19
  • @Y2020-09 My bad. Sorry. When I saw that blue text first time I thought it is nick... I'm reading it now, thanks :D :)) – areobah Nov 01 '20 at 13:22

0 Answers0