diff --git a/snscrape/modules/vkontakte.py b/snscrape/modules/vkontakte.py index 57eaa6d..c2b95f4 100644 --- a/snscrape/modules/vkontakte.py +++ b/snscrape/modules/vkontakte.py @@ -106,34 +106,9 @@ class VKontakteUserScraper(snscrape.base.Scraper): fixedPost = None lastPostID = float('infinity') - for item in self._soup_to_items(soup.find(id = 'page_wall_posts')): - postID = int(item.url.rsplit('_', 1)[1]) - if postID < lastPostID: - if fixedPost is not None and fixedPostID > postID: - yield fixedPost - fixedPost = None - yield item - lastPostID = postID - headers = self._headers.copy() - headers['X-Requested-With'] = 'XMLHttpRequest' - for offset in itertools.count(start = 10, step = 10): - logger.info('Retrieving next page') - r = self._post( - 'https://vk.com/al_wall.php', - data = [('act', 'get_wall'), ('al', 1), ('fixed', fixedPostID), ('offset', offset), ('onlyCache', 'false'), ('owner_id', ownerID), ('type', 'own'), ('wall_start_from', offset)], - headers = headers - ) - if r.status_code != 200: - raise snscrape.base.ScraperException(f'Got status code {r.status_code}') - # 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('