I have a web scraping script written in BeautifulSoup4. The script is supposed to retrieve information after 600 seconds. Now, my app is not starting.
I am calling the script from urls.py
from django.urls import path
from details.task import scrape
urlpatterns = [
...
]
scrape()
task.py
import time
from details.scrape import ScrapeFunction
def scrape():
ScrapeFunction()
time.sleep(600)
scrape()
The script must be called as soon as the app started.