-
Notifications
You must be signed in to change notification settings - Fork 1
/
task.py
55 lines (55 loc) · 1.58 KB
/
task.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# import os
# import django
#
# os.environ['DJANGO_SETTINGS_MODULE'] = 'web_crawler.settings'
# django.setup()
#
# from crawler.tasks import *
# from crawler.tools import get_token
#
#
# def crawler_1():
# token = get_token()
# beginning_web_crawling.delay(token)
# bana_web_crawling.delay(token)
# bnburde_web_crawling.delay(token)
# bagshoes_web_crawling.delay(token)
#
#
# def crawler_2():
# token = get_token()
# mjade_web_crawling.delay(token)
# jade_web_crawling.delay(token)
# luzzi_web_crawling.delay(token)
#
#
# def crawler_3():
# token = get_token()
# # gabangpop_web_crawling.delay(token)
# mclanee_web_crawling.delay(token)
# pau_web_crawling.delay(token)
# pink_web_crawling.delay(token)
# # wconcept_web_crawling.delay(token)
# whosbag_web_crawling.delay(token)
#
# # Auto run script at specific time
# import schedule
# import time
#
# schedule.every().monday.at("03:00").do(crawler_1)
# schedule.every().monday.at("06:00").do(crawler_1)
# schedule.every().tuesday.at("03:00").do(crawler_2)
# schedule.every().tuesday.at("06:00").do(crawler_2)
# schedule.every().wednesday.at("03:00").do(crawler_3)
# schedule.every().wednesday.at("06:00").do(crawler_3)
# schedule.every().thursday.at("03:00").do(crawler_1)
# schedule.every().thursday.at("06:00").do(crawler_1)
# schedule.every().friday.at("03:00").do(crawler_2)
# schedule.every().friday.at("06:00").do(crawler_2)
# schedule.every().saturday.at("03:00").do(crawler_3)
# schedule.every().saturday.at("06:00").do(crawler_3)
#
# while True:
# schedule.run_pending()
# time.sleep(1)
#