-4

I completed this web scraping tutorial : https://www.youtube.com/watch?v=XQgXKtPSzUI

(tl;dw: A dude teaches how to scrape an online store with Python and Beautiful Soup to create a database in csv).

My question is, since online stores constantly update their content, how do I set the script to run every, for example, ten minutes in order to update my database?

halfer
  • 19,471
  • 17
  • 87
  • 173
Elite_Doge
  • 21
  • 1
  • 2

1 Answers1

0

You can make another script that will execute your updating script every 10 minutes:

import os
import time

while True: 
  os.system("my_script.py")
  time.sleep(10*60)

Alternatively you can use CRON on linux for executing your script every 10 mins

Václav Struhár
  • 1,692
  • 10
  • 20