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.