Answer the question
In order to leave comments, you need to log in
How to ask posts VKontakte?
How to parse VKontakte posts? I was trying to parse a specific post that gets posted every day. But to begin with, for some reason, it was not possible to parse the posts themselves.
The code:
def parser():
request = requests.get('ссылка на группу')
parsing = BeautifulSoup(request.content, 'html.parser')
for value in parsing.select('._post_content > .post_content'):
text = value.select('.post_info > .wall_text > .wall_post_text')
print(text[0].text)
Answer the question
In order to leave comments, you need to log in
Use the official API.
Methods: wall.get , newsfeed.get .
Libraries for working with the VK API in Python:
vk_api (You can find more, inserted for an example.)
Examples of using the library .
And stop reading articles/watching videos. Who is the official documentation for?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question