Data from other websites


#1

How to get access data from other websites for my own. What is the code syntax?


#2

@kandhari78,
Can you explain us your question in more details? Like exactly what do you want to achieve?


#3

Like getting the weather data from another website.


#4

Well, there are a variety of ways. The simplest is to check if the website in question provides an API that you can access.
Then use JavaScript to update the concerned element on your webpage.


#5

https://openweathermap.org/api

Check this site


#6

hey @kandhari78

To obtain data from other websites you can adopt the following two methods:

  1. Check if the website provides an API. API is basically an interface through which a company provides access to their data and in addition to it also provides control of adding data. For Example, Twitter API enables a user to tweet programmatically.
  2. Scrapping: if the website does not provide access to data you can scrape the websites for the data. Beware, some websites hold critical data and scraping these websites might cause legal formalities. Anyways, look into Beautiful Soup it is a library for web-scrapping.