Skip to content

Instagram profile picture scrapers with Python explained

Posted in VIDEOS

Instagram Profile Picture Scraping with Python explained | HOX FRAMEWORK
Hello and welcome.
Previously you could scrape an instagram picture in its full quality easily.
This was done by finding profile’s id and visiting a specific link which gives
you the profile pic HD link, once you open it you get a picture.
However this method does not really work anymore. Luckily the scraping community
has found a new way.
In this video i showed you how to get at least double the size of the profile picture
of instagram profiles. Sometimes users will purposely upload low quality pictures but
that is rare.
How do you do it manually?

  1. Go to the victim’s profile
  2. add ?__a=1 to the link
    2+. for example www.instagram.com/therock?__a=1
  3. Press enter, once inside find a link for the profile pic
    3+. If there is more of them pick the HD one obviously
  4. copy the link and enter it. There you go
    How to do it in python?
    -This is a really clumsy way to do it … i did this in
    like 7 minutes you can do it way smarter.
    CODE:
    import requests
    import webbrowser #optional, you can use import os

and just do “chrome.exe %s”% link

import re
entryLink = str(input(“Enter your link:”))
profileLink = “%s?__a=1″% entryLink
getter = requests.get(profileLink)
getter = getter.text
regex = re.findall(r”\”profile_pic_url_hd\”\:\”\w\:\/\/\w.\w.{250}”, getter)
regex2 = re.findall(r”\”profile_pic_url_hd\”\:\”\w.+.net\””,str(regex))
regex2 = str(regex2)
regex2 = regex2.replace(“‘”,””) regex2 = regex2.replace(‘”profile_pic_url_hd”:’,””) regex2 = regex2.replace(‘”‘,””) regex2 = regex2.replace(“‘”,””) regex2 = regex2.replace(‘‘,””)
print(regex2)
webbrowser.open_new_tab(regex2)