Skip to main content

IMDB List Scraper

This was a script I wrote to download movie titles from a list on IMDB. It leverages the HTML tags in the document to get the information. I did have to do a couple CONTROL-F's to replace some extra characters, but that was about it.

#!/bin/bash 
n=1
# Iterate the loop for 50 times
while [ $n -le 50 ]
do
# Print the value of n in each iteration
echo "Running $n time"
curl "<link here>" | grep "href=\"/title/tt" -A 1 | grep "img alt" | tr -d '"' | cut -b 12- >> movies_list.txt
# Increment the value of n by 1
(( n++ ))
done