diff --git a/snscrape/modules/vkontakte.py b/snscrape/modules/vkontakte.py index 4072372..c12977e 100644 --- a/snscrape/modules/vkontakte.py +++ b/snscrape/modules/vkontakte.py @@ -80,14 +80,15 @@ class VKontakteUserScraper(snscrape.base.Scraper): if r.status_code != 200: logger.error(f'Got status code {r.status_code}') return - fields = r.content.split(b'') - if fields[5].startswith(b'
'): + # Convert to JSON and read the HTML payload. Note that this implicitly converts the data to a Python string (i.e., Unicode), away from a windows-1251-encoded bytes. + posts = r.json()['payload'][1][0] + if posts.startswith('
'): # Reached the end break - if not fields[5].startswith(b'