PLATE NO. 02 β€” AUTOMATION

Job Bot: a job-discovery pipeline that runs three times a day and needs nothing from me

A GitHub Actions–scheduled scraper that turns "manually checking job boards" into a background process β€” scraping, filtering, ranking, and deduplicating Internshala listings before pushing the result to Telegram.

StackPython Β· BeautifulSoup Β· Requests Β· YAML Β· GitHub Actions Β· Telegram Bot API
RoleSole builder, end to end
StatusDeployed, cron 3Γ—/day
RepoPrivate (available on request)

Vision

I was applying to entry-level Data Analytics, Business Analytics, BI, SEO, and HR Analytics roles, and losing time to the same repetitive task: checking job boards multiple times a day, scanning mostly-irrelevant listings across several sites. I didn't want a tool that applied on my behalf β€” I still wanted to be the one deciding what to apply to. I wanted the discovery and filtering automated, not the judgment.

What I actually wanted to prove wasn't "can I scrape a website" β€” it was whether I could design a system that keeps working with zero manual maintenance: runs unattended three times a day, survives the source site changing its HTML under it, and can be retuned with new priorities without touching a line of code.

What it actually does

Job Bot runs automatically three times a day via GitHub Actions: it scrapes Internshala across several role categories relevant to my profile β€” Data Analyst, Data Scientist, Business Analyst, SEO, HR, Full-Stack Developer, Digital Marketing β€” normalizes every listing into a common format, filters out anything that doesn't match my role, location, stipend, or recency criteria, removes anything already notified, ranks what's left by a two-dimensional priority system, and sends the results as a formatted Telegram message. If nothing new has come through for a couple of days, it sends a "here's what's still live" check-in instead of staying silent.

Architecture & data flow

A GitHub Actions cron schedule checks out the repo, installs dependencies, and runs main.py β€” the single entry point that orchestrates everything in sequence, then exits. Nothing runs continuously.

β†’ sources/internshala.pyfetches raw listings, paginates each category, stops once a page returns fewer than 10 cards
β†’ job_model.pydefines the normalized job shape every source produces; owns the dedup hashing function
β†’ filter.pyapplies every rule from config.yaml β€” role, exclude keywords, location/stipend, max-age
β†’ dedup.pycompares against seen_jobs.json, drops anything already seen
β†’ priority.pytwo-key sort: role-group tier, then location tier within it
β†’ notify.pyformats an HTML Telegram message (or a digest if the quiet-streak threshold is hit) and posts it

A final Actions step commits the updated seen_jobs.json and notify_state.json back to the repo, so state persists across runs with no database.

Why these technologies

BeautifulSoup + Requests over Selenium/Playwright β€” Internshala's listing pages are server-rendered HTML, not JS-hydrated, so a headless browser would have been pure overhead. I evaluated two other sources (a Technopark/Infopark board and a Kerala government internship portal) and found both were JS-rendered β€” I disabled them rather than add a headless-browser dependency to the whole project for two secondary sources.

YAML config over hardcoded constants β€” my actual search criteria changed multiple times: role priorities, location tiers, stipend thresholds were all revised more than once. Keeping that in one declarative file meant every change was a config edit and a git push, never a code change.

GitHub Actions over a VPS β€” a hard requirement to run free indefinitely without maintaining infrastructure. A scheduled workflow that spins up, runs, and tears down costs nothing on the free tier.

File-based JSON state over a database β€” the entire state to persist is "which job hashes have I already sent" and "when did I last send anything" β€” a few KB at realistic volume. Git itself becomes the persistence layer.

Real problems I hit

The pagination bug

The bot consistently reported far fewer HR postings than I could see browsing manually. Scraping, filtering, and dedup all looked correct in isolation.

FIELD NOTE

The bug was that I only ever fetched page 1 of each category. Anything past it was never fetched β€” not filtered out, invisible before it reached my filtering logic. Fixed by paginating up to a configurable max_pages_per_category, stopping once a page returns fewer than 10 cards β€” a reliable signal that Kerala-specific results have run out and Internshala has started backfilling from other cities.

Why the parser keys off URL patterns, not CSS classes

My first version selected fields with CSS selectors like h3.job-internship-name a. Within about a week, Internshala changed its markup and every selector silently stopped matching.

FIELD NOTE

The scraper kept running without errors, but every job came back as "Untitled role" β€” a worse failure mode than a crash, since nothing looked broken from the logs alone. I rewrote the parser to find listings by their detail-page URL pattern instead of CSS classes, and read plain text lines inside each card by recognizable patterns (a regex for "β‚ΉX,XXX/month" or "X days ago" shapes) rather than exact class names.

One follow-on bug: I assumed the "Actively hiring" badge always appeared before the company name. It sometimes appears after, which caused the parser to misread the badge as the location field. Fixed by checking both positions β€” caught because I tested against a snippet of real fetched HTML, not my imagined structure.

Two-dimensional priority ranking

Highest-priority roles (Data Analyst, Data Scientist, Business Analyst) needed to show regardless of location or pay. Among lower-priority roles like SEO, HR, and Digital Marketing, location needed to matter β€” Kerala first, then Bangalore/Mysore, then Tamil Nadu conditionally on stipend, North India deprioritized unless pay cleared a threshold. Implemented as a sort on a (role_rank, location_rank) tuple, with a bypass_if_stipend_above override that can promote a normally lower-priority role if it clears β‚Ή12,000/month.

FIELD NOTE

The tricky part: a role group's "bypass location and stipend rules entirely" flag (used for core roles I wanted shown from anywhere, at any pay) had to not also bypass the hard location exclusion list used to filter out Maharashtra postings entirely β€” two different rules that both touch location, easy to accidentally let one swallow the other. Verified with a real run: a Business Analyst fresher-job posting from Ahmedabad correctly ranked ahead of two lower-paying Ahmedabad internships, because its annualized stipend cleared the North India bar and the others didn't.

Stipend normalization

Internshala lists pay inconsistently β€” monthly, annual, ranges, or just "Competitive stipend." My thresholds all operate in monthly terms, so I built a parser that takes the lower bound of any range (deliberately conservative β€” better to under-estimate pay than let something through that doesn't clear a bar), divides "/year" figures by 12, and returns None rather than zero for unparseable text, so those postings get the benefit of the doubt in location filtering instead of being silently rejected. Verified against a real listing: "β‚Ή2,00,000 – 2,40,000/year" correctly normalizes to roughly β‚Ή16,667/month.

Deduplication and pruning

Every job is hashed (from its detail-page link, falling back to title+company) and stored in seen_jobs.json with its first-seen date. A prune step runs before every write and drops hashes older than a configurable window (30 days by default), so the state file stays small.

FIELD NOTE

The bot reported zero new matches across multiple runs over two days, despite finding ~13–14 postings that passed filtering each time. The dedup logic itself was fine β€” the real issue was a runtime/deployment gap: I'd edited seen_jobs.json locally without pushing it, so GitHub Actions was still reading the previously-committed version, unaffected by my local change. I added debug logging that prints the state file's absolute path and entry count at the start of every run, which made this instantly diagnosable going forward.

Secrets & security

The Telegram bot token and chat ID are never hardcoded. config.yaml stores them as placeholders ("${TELEGRAM_BOT_TOKEN}"), and load_config() substitutes any ${ENV_VAR} pattern with the actual environment variable at runtime β€” populated in Actions from encrypted repository secrets. There's an explicit runtime guard: before sending anything, it checks whether a credential is missing or still literally starts with "${" (substitution never happened) and exits with an error rather than failing silently.

Note for accuracy: I haven't yet run a full history audit (git log -p | grep -i token, or a scanner like gitleaks) confirming no secret was ever accidentally committed. The repo is currently private. Before making it public, that check is still worth doing properly rather than assumed.

Cutbacks & deliberate scope decisions

  • Single job source instead of the several originally planned (Indeed, Wellfound, Technopark/Infopark, a Kerala government portal). Indeed blocks non-browser traffic; the local sources are JS-rendered. I chose to make one source genuinely robust instead of running several half-working ones.
  • No database β€” two flat JSON files, version-controlled through git, cover the state this project needs.
  • No web dashboard. The point was eliminating manual checking β€” building another interface to check would work against the goal. Telegram is the entire interface.
  • No auto-apply or AI-generated summaries. Discovery and filtering are automated; the decision to apply, and how to present myself, stays mine.

Limitations I'm upfront about

  • Depends entirely on one source β€” if Internshala changes markup again beyond what the URL-pattern parser handles, or blocks scraping outright, the bot goes quiet until I notice. There's no alerting for "the scraper itself failed," only for job matches.
  • Two sources (Technopark/Infopark, Kerala government portal) exist in the codebase but are disabled pending a headless-browser dependency β€” a known gap.
  • Location and role matching are keyword-based, not semantic. One real example: a plain "Business Analyst" filter initially pulled in unrelated "Equity Research Analyst" postings from finance, needing an explicit exclude-keyword pass.
  • The relative-date parser covers every phrasing I've observed so far, not guaranteed exhaustive.
  • The "digest after N quiet days" feature is newly added and, as of writing, tested thoroughly in isolation but not yet proven end-to-end over a real multi-day production cycle.