Copy text from Wikipedia in Python

Asked

Viewed 26 times

-3

Hello, I was wondering how I can copy the text of a page in Wikipédia, it can be only the first paragraph on the subject

Here’s what I’ve done:

from selenium.webdriver.common.keys import Keys 
print('Pesquise aqui o que você quiser:') 
var1 = input() 
navegador = webdriver.Chrome() navegador.get('https://pt.wikipedia.org/wiki/%s' %var1)
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.