-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (24 loc) · 1.01 KB
/
Copy pathmain.py
File metadata and controls
29 lines (24 loc) · 1.01 KB
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
import asyncio
from src.scrapers.devfolio import DevfolioScraper
from src.scrapers.dorahacks import DoraHacksScraper
from src.scrapers.tianchi import TianchiScraper
from src.scrapers.topcoder import TopcoderScraper
from src.scrapers.taikai import TaikaiScraper
from src.scrapers.kaggle import KaggleScraper
async def main():
print("[*] Launching OpenSpark Bot Core execution context...")
scrapers = [
DevfolioScraper(),
DoraHacksScraper(),
TianchiScraper(),
TopcoderScraper(),
TaikaiScraper(),
KaggleScraper()
]
print(f"[*] Initializing asynchronous processing for {len(scrapers)} active sweep engines...")
raw_results = await asyncio.gather(*[s.fetch_raw_data() for s in scrapers])
for scraper, raw_html in zip(scrapers, raw_results):
parsed = scraper.parse_data(raw_html)
print(f"[+] Engine Result -> Source: {scraper.__class__.__name__} | Extracted Items Count: {len(parsed)}")
if __name__ == "__main__":
asyncio.run(main())