Jump to content

taking screenshots of a website

TheBean

I want to design an app that shows you the weather. I want to use Dark Sky because its super accurate but they are no longer accepting API registrations. So, I thought of an interesting solution but I am not sure how to code it as i'm still pretty new to programming. 

 

In the background (every 10 minutes), take a screenshot of the dark sky website and save it on your device. Then, when you click on the icon in the taskbar, it basically just shows you the picture. 

 

I have not started at all yet but I just want to know if this is even possible in Java. And if it is, how would you code java to take screenshots of a webpage?

Link to comment
Share on other sites

Link to post
Share on other sites

This is probably not an approved use of their website and probably breaks some terms.

What you really want is not to take a screenshot, but rather to scrape the data from the website.

It's possible, but there are probably better alternatives -- even though it's less accurate.

QUOTE/TAG ME WHEN REPLYING

Spend As Much Time Writing Your Question As You Want Me To Spend Responding To It.

If I'm wrong, please point it out. I'm always learning & I won't bite.

 

Desktop:

Delidded Core i7 4770K - GTX 1070 ROG Strix - 16GB DDR3 - Lots of RGB lights I never change

Laptop:

HP Spectre X360 - i7 8560U - MX150 - 2TB SSD - 16GB DDR4

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, RadiatingLight said:

This is probably not an approved use of their website and probably breaks some terms.

What you really want is not to take a screenshot, but rather to scrape the data from the website.

It's possible, but there are probably better alternatives -- even though it's less accurate.

I took a look at their TOS and nothing seemed to indicated that I can't do that.  (this is personal use only and not commercial so I should be fine). 

If I were to scrape data, it makes my life much harder because then I would have to then display that information in a nice way back to the user. I don't have the skills for that. 

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, Saksham said:

I took a look at their TOS and nothing seemed to indicated that I can't do that.  (this is personal use only and not commercial so I should be fine). 

If I were to scrape data, it makes my life much harder because then I would have to then display that information in a nice way back to the user. I don't have the skills for that. 

The problem with a screenshot is that it can't scale to different screen sizes and is actually harder to take than simply scraping the website. (You'd need to not only get the HTML, but also run it in an environment where you can screenshot and IDK how to do that.

If you really want it to look exactly like the darksky website, then just go to their website. You can make your app a 'frame' (good example of this is the desmos app, which literally just loads their mobile website)

QUOTE/TAG ME WHEN REPLYING

Spend As Much Time Writing Your Question As You Want Me To Spend Responding To It.

If I'm wrong, please point it out. I'm always learning & I won't bite.

 

Desktop:

Delidded Core i7 4770K - GTX 1070 ROG Strix - 16GB DDR3 - Lots of RGB lights I never change

Laptop:

HP Spectre X360 - i7 8560U - MX150 - 2TB SSD - 16GB DDR4

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×