Skip to content

Instantly share code, notes, and snippets.

@ngarbezza
Created March 10, 2014 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngarbezza/9459235 to your computer and use it in GitHub Desktop.
Save ngarbezza/9459235 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import datetime, os
START_DATE = datetime.date(2008, 6, 28)
BASE_URL = "http://static.macanudo.com.ar/macanudo_pics/"
current_date = START_DATE
while current_date <= datetime.date.today():
file_to_download = current_date.strftime("%Y%m%d") + ".jpg"
if os.path.exists(file_to_download):
print("Macanudo del " + str(current_date) + " ya esta descargado")
else:
print("Descargando Macanudo del " + str(current_date) + "...")
os.system("wget -t 1 -T 5 " + BASE_URL + file_to_download)
current_date = current_date + datetime.timedelta(days=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment