1
Opa, I’m creating a tool that searches the wordpress version and prints on screen (requests + bs4).
Excerpt from the code:
def versao():
r = requests.get('https://'+f'{site}')
html = r.text
sopinha = BeautifulSoup(html, 'html.parser')
versao = sopinha.find_all('meta', attrs={'name':'generator'})
print(versao)
versao()
I wanted it to return only the wordpress version number, as for example: 4.9.2
But he returns all this: (I left in red what I want to return)
You’ve searched all the elements
<meta>
page. It would not be the case to search only what you havename="generator"
and treat its value?– Woss
I tried to take the goal but it gives the same result
– Richard Marcelo