Most websites have terms and conditions saying that automated retrieval of their content is prohibited.
It is generally all up to the Terms and Conditions of the site.
If a site wanted to share it's data it would normally give you an API.
You could email them and ask for permission if they do prohibit it, depending on your purpose.
And scraping does have its drawbacks such as changing site design and having to change your code with it.
The best and only way to scrape is just to retrieve the webpage in your application and parse out the results you want. You could do things such as XSS but it all depends on the complexitiy of the data. Normally the split and substring and indexof functions are what you will use.