How I made a Instagram Bot with face detection.
Steffan Jensen
Posted on March 23, 2019
Instagram scraper with autopost and face detection.
I made an Instagram Bot which autoscraped peoples profiles took a machine learning module and reposted the images back to Instagram. I am new to python, so many of the fundamentals are missing, all feedback are good.
This was maybe my third python bot, I had played little around with different social network bots on Github, they all ended up on the same road, liking pictures of dogs, commercials and other weird stuff, I reached out to the bot creators most said it was impossible, too much work.
Download My Instagram Bot:
https://github.com/instagrambot/Instagram-scraper-with-autopost
How I implemented face detection
So i ended up implementing it myself with only 2 lines of code.
image = face_recognition.load_image_file(instapath)
face_locations = face_recognition.face_locations(image)
# If no face located scrape the next profile
if not face_locations:
print("There is no Face Detected scraping next profile")
x += 1
instascraper()
else:
print("There is a Face Detected scraping and posting this image")
Face detection at work on a live webcam
I had already made the scraper/reposter myself within a few days, so to implement this code and it just worked.. was perfect
My script right now have a few third party packages and it's really fun to see how easy it's it to implement different modules. I think Python is a really fun language and the possibilities and endless.
My Instagram Scraper Website:
https://instabotai.com
Download My Instagram Bot:
https://github.com/instagrambot/Instagram-scraper-with-autopost
Posted on March 23, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.