-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmainspider.py
144 lines (129 loc) · 6.35 KB
/
mainspider.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings
from playwright.sync_api import sync_playwright
import schedule
import time
# COLLEGE OF ENGINEERING CHENGANNUR
from my_scrapers.CEC.cec_spider import *
# COLLEGE OF ENGINEERING ADOOR
from my_scrapers.AEC.aec_scraper import *
# COLLEGE OF ENGINERRING KARUNGAPPALLY
from my_scrapers.CEK.cek_scraper import *
# MODEL ENGINEERING COLLEGE
from my_scrapers.MEC.mec_scraper import *
def main():
process = CrawlerProcess(get_project_settings())
clear_file() # defintion is in cec_scraper file
# COLLEGE OF ENGINEERING CHENGANNUR
process.crawl(CEC_principal_spider)
process.crawl(CEC_PTASpider)
process.crawl(CEC_NoticeSpider)
process.crawl(CEC_DepartmentSpider)
process.crawl(CEC_placementSpider)
process.crawl(CEC_AdmissionsSpider)
process.crawl(CEC_organisationSpider)
process.crawl(CEC_InternalQualityAssuranceSpider)
process.crawl(CEC_FacilitiesSpider)
process.crawl(CEC_CollegeInfoSpider)
process.crawl(CEC_CommitteeSpider)
process.crawl(CEC_BoardOfGovernorsSpider)
process.crawl(CEC_AntiRaggingSpider)
process.crawl(CEC_AnnounceSpider)
process.crawl(CEC_AICTEFeedbackSpider)
process.crawl(CEC_AdminStaffSpider)
process.crawl(CEC_nri_AdmissionSpider)
# COLLEGE OF ENGINEERING ADOOR
process.crawl(AEC_DepartmentSpider)
process.crawl(AEC_AlumniSpider)
# COLLEGE OF ENGINEERING KARUNAGAPPALLY
process.crawl(CEK_principal)
process.crawl(CEK_management)
process.crawl(CEK_admin_staff)
process.crawl(CEK_overview)
process.crawl(CEK_infrastructure)
process.crawl(CEK_anti_ragging_squad)
process.crawl(CEK_Departmentdata)
process.crawl(CEK_contact)
process.crawl(CEK_placement)
process.crawl(CEK_library)
process.start()
# MODEL ENGINEERING COLLEGE
# with sync_playwright() as playwright:
# scrape_principal_details(playwright)
# scrape_about_section(playwright)
# scrape_board_of_governors_section(playwright)
# scrape_administrative_staff_section(playwright)
# scrape_academic_council_section(playwright)
# scrape_pta_section(playwright)
# scrape_senate_section(playwright)
# scrape_admission_details_section(playwright)
# scrape_facilities(playwright)
# scrape_about_statutory_committee(playwright)
# scrape_iqac_section(playwright)
# scrape_grievance_cell(playwright)
# scrape_anti_ragging_committee(playwright)
# scrape_anti_ragging_squad(playwright)
# scrape_anti_sexual_harassment_cell(playwright)
# scrape_safety_manual(playwright)
# comp_sci_section(playwright,"About")
# comp_sci_section(playwright,"Vision & Mission")
# comp_sci_section(playwright,"Courses Offered")
# comp_sci_section(playwright,"HOD")
# comp_sci_section(playwright,"Faculty")
# comp_sci_section(playwright,"Facilities")
# comp_sci_section(playwright,"Resources")
# comp_sci_section(playwright,"Associations")
# comp_sci_section(playwright,"Achievements")
# comp_sci_section(playwright,"Recent Projects")
# electronics_and_communication_section(playwright,"About")
# electronics_and_communication_section(playwright,"Vision & Mission")
# electronics_and_communication_section(playwright,"Courses Offered")
# electronics_and_communication_section(playwright,"HOD")
# electronics_and_communication_section(playwright,"Faculty")
# electronics_and_communication_section(playwright,"Facilities")
# electronics_and_communication_section(playwright,"Resources")
# electronics_and_communication_section(playwright,"Associations")
# electronics_and_communication_section(playwright,"Achievements")
# electronics_and_communication_section(playwright,"Recent Projects")
# electronics_and_communication_section(playwright,"Recent Projects")
# electrical_and_electronics_section(playwright,"About")
# electrical_and_electronics_section(playwright,"Vision & Mission")
# electrical_and_electronics_section(playwright,"Courses Offered")
# electrical_and_electronics_section(playwright,"HOD")
# electrical_and_electronics_section(playwright,"Faculty")
# electrical_and_electronics_section(playwright,"Facilities")
# electrical_and_electronics_section(playwright,"Resources")
# electrical_and_electronics_section(playwright,"Associations")
# electrical_and_electronics_section(playwright,"Recent Projects")
# electronics_and_biomedical_section(playwright,"About")
# electronics_and_biomedical_section(playwright,"Vision & Mission")
# electronics_and_biomedical_section(playwright,"Courses Offered")
# electronics_and_biomedical_section(playwright,"HOD")
# electronics_and_biomedical_section(playwright,"Faculty")
# electronics_and_biomedical_section(playwright,"Facilities")
# electronics_and_biomedical_section(playwright,"Resources")
# electronics_and_biomedical_section(playwright,"Associations")
# electronics_and_biomedical_section(playwright,"Achievements")
# electronics_and_biomedical_section(playwright,"Recent Projects")
# mechanical_engineering_section(playwright,"About")
# mechanical_engineering_section(playwright,"Courses Offered")
# mechanical_engineering_section(playwright,"HOD")
# mechanical_engineering_section(playwright,"Faculty")
# mechanical_engineering_section(playwright,"Facilities")
# mechanical_engineering_section(playwright,"Resources")
# applied_science_section(playwright,"About")
# applied_science_section(playwright,"HOD")
# applied_science_section(playwright,"Faculty")
# applied_science_section(playwright,"Resources")
# placements_section(playwright,"Activities")
# placements_section(playwright,"Placement Statistics")
# placements_section(playwright,"Brochure")
# placements_section(playwright,"Student Verification")
# placements_section(playwright, "Contact Details")
if __name__ == "__main__":
schedule.every(1).minutes.do(main)
while True:
# Checks whether a scheduled task
# is pending to run or not
schedule.run_pending()
time.sleep(1)