File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ """
2+ Real-time debug script for the IISc Bangalore tender scraper.
3+
4+ Purpose:
5+ Fetches live data from the IISc tender portal and performs a keyword search
6+ for specific target phrases (e.g., 'lithography') to verify scraper accuracy.
7+ """
8+ from scrapers .iisc import scrape_iisc
9+
10+
11+ def main ():
12+ print ("=" * 80 )
13+ print ("LIVE IISc SCRAPE DEBUG" )
14+ print ("=" * 80 )
15+
16+ tenders = scrape_iisc ()
17+
18+ print (f"\n Total tenders scraped: { len (tenders )} \n " )
19+
20+ if not tenders :
21+ print ("No tenders returned from scraper." )
22+ return
23+
24+ found_target = False
25+ target_phrase = "maskless laser lithography"
26+
27+ for idx , tender in enumerate (tenders , 1 ):
28+ title = tender .get ("title" , "" )
29+ org = tender .get ("organization" , "" )
30+ date = tender .get ("published_date" , tender .get ("date" , "N/A" ))
31+ url = tender .get ("source_url" , "N/A" )
32+
33+ print (f"[{ idx } ]" )
34+ print (f"Title: { title } " )
35+ print (f"Organization: { org } " )
36+ print (f"Date: { date } " )
37+ print (f"URL: { url } " )
38+ print ("-" * 80 )
39+
40+ if target_phrase in title .lower ():
41+ found_target = True
42+
43+ print ("\n " + "=" * 80 )
44+ print ("TARGET CHECK" )
45+ print ("=" * 80 )
46+
47+ if found_target :
48+ print ("FOUND: Maskless laser lithography tender is being scraped." )
49+ else :
50+ print ("NOT FOUND: scraper is missing the tender." )
51+ print ("This means the issue is in scrapers/iisc.py, not matching/email." )
52+
53+
54+ if __name__ == "__main__" :
55+ main ()
You can’t perform that action at this time.
0 commit comments