Python 3 Script to Scrape Wikipedia API Articles For Keyword or Term Using pywhatkit Library Full Project For Beginners

 

 

pip install pywhatkit

 

 

 

app.py

 

 

# Amresh Ranjan.

import pywhatkit as kt

print('Wiki Summery wait few seconds!\n')

target1 = "Python"
target2 = 'Tom Latham'

print('\n')
kt.info(target1,lines=3)

print('\n')
kt.info(target2,lines=30)

 

 

 

 

As you can see you can also control which term or keyword you want to scrape the wikipedia and also you can control the number of lines to scrape from the api.

 

Leave a Reply