Question

I have a small Java program which hits a URL of a website I like and grabs an image so I can view it all on its own without the rest of the site.

URL myURL = new URL("http://example.com/");
URLConnection conn = myURL.openConnection();

I parse the HTML on the page, find the image, and display it in a window.

Now, the site in question gets it's revenue from Ads on the page.

My question is, does the site still make any money when I "visit" it with Java rather than visiting it in my browser? Or am I bypassing the system and the site loses money?

Assuming the site ads do not load, is there a way to "load" them so that the site can make money off my visit?

Was it helpful?

Solution

Just connecting via Java and fetching the image will not load the ads, which are almost certainly loaded by JavaScript. Doing a GET on the page source will probably not even fetch the JavaScript files, let alone execute them.

OTHER TIPS

The only ethical solution to this is:

  1. Read and respect the website's terms of use.

  2. Respect what the robots.txt file says.

  3. If you are still concerned, reach out to them and ask permission for what you are doing.

Any purely technical solution to this is likely to short-change the website owner, the ad broker, or the business that is paying for the advertisements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top