Skip to content

Commit

Permalink
fix #30
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidatorCoder committed Oct 28, 2021
1 parent 9499517 commit 2cfa8fb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions server/scraper.py
Expand Up @@ -39,6 +39,29 @@ def only_new_notice_tr(tag):
return tag.name == 'tr' and not tag.has_attr('id') and not tag.has_attr('style')


# Check college


def check_college(title):
college = ""
for check in ["usict", "usit", "usct", "usms", "uslls", "usbt", "usmc", "usap", "msit", "usar", "usdi", "bvce", "gtbit"]:
if check in title.lower():
college = check
break
return college

# Check notice tags


def check_tags(title):
tags = set()
for check in ["ph.d", "b.tech", "b.sc", "m.sc", "m.tech", "cet", "theory", "result", "merit", "scholar", "research", "revised", "annual", "practical", "hackathon", "counselling", "date", "datesheet", "final", "exam", "examination", "time", "last", "calendar", "schedule", "proposed"]:
if check in title.lower():
tags.add(check)
return list(tags)



def sensor():

global notices
Expand Down

0 comments on commit 2cfa8fb

Please sign in to comment.