Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Replace panic calls with returned errors in scrapers

未关闭
#192 0 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

@Tyson-TVN 已经在做这个了。

开始于 2026年9月27日。

  • #203 来自 @Tyson-TVN —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

L1 recommended for recruits

Overview

Every scraper in the scrapers folder calls panic(err) when something goes wrong. This crashes the whole process and stops the scrape. Some scrapers run for a long time. For example, astra.go scrapes a full year of dates, and coursebook.go walks through every course prefix. If one HTTP request fails in the middle of a run, all the progress so far is lost.

Change the scrapers so that instead of calling panic(err), they return the error to the caller. Start with the smaller scraper files, for example scrapers/discounts.go and scrapers/map.go, then move to the larger ones. Do not change what the scrapers do, only how they report failures.

Some scrapers already use log.Fatal and log.Panic in a few places. Treat those the same way and return errors instead.

Resources

主要语言
Go
星标
12
派生
54
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

UTDNebula/api-tools 的其他 Issue

查看 UTDNebula/api-tools 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。