V
V
Vadim kyklaed2016-11-11 14:59:49
Python
Vadim kyklaed, 2016-11-11 14:59:49

How to parse this kind of tags?

there is such a tag How to get TEXT, for i in page.html.find_all('meta') so you can get all the meta? for example, there are 10 of them and each has content and property=" is unique <meta property="og:title" content="ТЕКСТ" />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Lutchenko, 2017-01-19
@kyklaed

Try this
meta = soup.find_all('meta') #this way you will get all
meta_1 = soup.select('meta')[0] #this way select the ones you need
And then do split() and clean up the garbage.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question