Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions instagram_web_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<rhx_gis>[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<rhx_gis>[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):
Expand Down Expand Up @@ -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
Expand Down