Another cooking video Instagram, but closer
I’ve always enjoyed Tasty videos. They’re quick and make the recipe look easy. I also always wanted to create a funny bot account. The idea of taking the familiar style of Tasty and Nifty videos, but zooming them in a little too close to see what’s going on seemed funny to me.
The results are silly but also sometimes pretty artsy.
Unfortunately, Instagram is difficult to work with programmatically, and I didn’t want to run a server just for this project. Plus with all the free time during lockdown, I might as well just post them myself and revisit making a bot if it felt worthwhile.
Using Python and instaloader downloading software, I created a system to create cropped videos.
The main function of step 2 looks like this:
# crop.py
for f in all_in_files:
split = f.split(".", 1)
# isCroppable: if the end is mp4 and has not been processed yet
if isCroppable(split, f):
# create a randomly cropped video
crop_video(f)
# get the caption with appended hashtags and copy it
caption = get_caption(split[0])
copy(caption)
print('COPIED:\n' + caption + '\n')
# log the video as cropped and posted
log(f)
breakOh-ho yes
The account posted regularly for a few weeks during the early part of lockdown in 2020. Honestly it was a fun project to run — finding a Tasty video, downloading it, cropping it to just the wrong part of the frame, and posting it with the original caption felt like a perfect pandemic side quest.
The automated pipeline worked well. The hardest part was that Instagram’s API restrictions meant I couldn’t fully automate posting. Step 3 — the manual post — was by design, but it also meant the project was dependent on me actually sitting down to do it. Eventually I got busy with other things and posting trailed off.
The automation was solid for what it was. If I were doing it again I’d probably fully commit to running a lightweight server to handle the Instagram posting (so it could run on a schedule, or whenever a new video is posted). The whole joke depends on this page being full of content, the further back the better, so automating is the way to go.