Fortnite Item Shop Viewer Rough Draft


Download


Below is a Python Rough Draft Script I wrote for Raspbian/RaspberryPiOS to check the Fortnite Item Shop because I am so lazy, I can't be bothered to search up the website I'm wgetting it from.



#Fortnite Item Shop Viewer - Rough Draft
#FN_ItemShopViewer_RoughDraft.py

import datetime
import subprocess


#Fortnite Item Shop Actual updates at 0000 UTC 1800 CST

#Target time will be 1811 for simplicity sake: datetime does not use
#leading zeros.
x = True
while x is True:
     redundancyPrevention = True
     subprocess.run(['rm *.jpg'], shell=True)
     subprocess.run(["wget", "-nd", "-p", "--accept=.jpg", "-e", "robots=off", "--reject=0.jpg", "--reject=8.jpg", "fnitemshop.com"])
     subprocess.run(["gpicview", "--slideshow", "FortniteItemShopCoverPicture.png"])
     x=False
while True:
     currentTimeObj = datetime.datetime.now()

     if currentTimeObj.hour == 18 and currentTimeObj.minute == 11 and redundancyPrevention is True:
         subprocess.run(["sudo", "pkill", "-f", "gpicview"])
         subprocess.run(['rm *.jpg'])
         subprocess.run(["wget", "-nd", "-p", "--accept=.jpg", "-e", "robots=off", "--reject=0.jpg", "--reject=8.jpg", "fnitemshop.com"])
         subprocess.run(["chmod", "a+r+w+x", "*.jpg"])
         subprocess.run(["gpicview", "--slideshow", "FortniteItemShopCoverPicture.png"])
         redundancyPrevention = False
     if currentTimeObj.hour == 18 and currentTimeObj.minute == 12 and redundancyPrevention is False:
         redundancyPrevention = True