Write a script (named “wiki_extractor.py”) that performs a Wikipedia search using the provided keyword, and returns urls of “n” related Wikipedia pages. Additionally, the script should also extract one paragraph from each such page and return the result as a json file (Details given below).
Input arguments: --keyword (string argument to define the query string)
--num_urls (integer argument for number of wikipedia pages to extract from)
--output (output json-file name)
Here, two kinds of data files which fetches information from wiki and is later processed.