Using an HTTP GET method, retrieve information from Wikipedia using a given topic. Query https://en.wikipedia.org/w/api.php?action=parse§ion=0&prop=text&format=json&page=[topic] to get the topic Wikipedia article. Print the total number of times that the string topic appears in the article's text field.
Note: te search is case-sensitive.
The query response from the website is a JSON object described below:
- parse: A JSON object representing the article's parsed web page. It has the following three fields:
- title: The article's title, as specified by the argument passed as topic
- pageid: The article's Page ID
- text: A JSON object that contains the Wikipedia article as an HTML dump
Input: pizza -> topic = 'pizza'
Output: 149 (this number might be incorrect, is just used as an example)