You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is my proposed fix, if someone wants to make it use the python standard html.parser library that would be much appreciated. Also code is not tested formally but seems to work for most situations (picture, private_user, normal_user).
import requests
from bs4 import BeautifulSoup
import re
def instagram_username(self):
if "instagram" in self._data:
x = requests.get(self._data['instagram']['photos'][0]['link']).text
soup = BeautifulSoup(x, 'html5lib')
meta_str = soup.find('meta',
attrs={'property': 'og:description'})['content']
ig_uname = re.findall('@[^\s|\W]*', meta_str)
return ig_uname[0][1:]
#return self._data['instagram']['username']
The text was updated successfully, but these errors were encountered:
No, it appears that the api has changed and now the Instagram[] does not contain "photos". I searched through the useable content in Instagram[] ("image", "thumbnail" and "profile_photo") but they all appear to be links to the cdn. The cdn's page has no way of locating the user.
I think this has been changes with FB/IG's protocol rather than Tinder's, but unfortunately I can't find any way to get instagram_username anymore.
Here is my proposed fix, if someone wants to make it use the python standard html.parser library that would be much appreciated. Also code is not tested formally but seems to work for most situations (picture, private_user, normal_user).
The text was updated successfully, but these errors were encountered: