diff --git a/instagram_web_api/client.py b/instagram_web_api/client.py index 0a2eaf27..476d8e85 100644 --- a/instagram_web_api/client.py +++ b/instagram_web_api/client.py @@ -307,13 +307,18 @@ def _sanitise_media_id(media_id): media_id = media_id.split('_')[0] return media_id + # @staticmethod + # def _extract_rhx_gis(html): + # mobj = re.search( + # r'"rhx_gis":"(?P[a-f0-9]{32})"', html, re.MULTILINE) + # if mobj: + # return mobj.group('rhx_gis') + # return None + @staticmethod def _extract_rhx_gis(html): - mobj = re.search( - r'"rhx_gis":"(?P[a-f0-9]{32})"', html, re.MULTILINE) - if mobj: - return mobj.group('rhx_gis') - return None + tmp_str = ':{"id":"'+f'{random.randint(10000000,99999999)}'+'"}' + return hashlib.md5(b'tmp_str') @staticmethod def _extract_csrftoken(html): @@ -592,7 +597,6 @@ def media_comments(self, short_code, **kwargs): 'edge_media_to_comment', {}).get('edges', [])] return info - @login_required def media_likers(self, short_code, **kwargs): """ Get media likers