Skip to content

Commit

Permalink
Merge pull request #164 from GDSC-PKNU-Official/fix/#163
Browse files Browse the repository at this point in the history
Fix/#163: 공간정보시스템공학과 크롤링에 발생하는 문제 해결
  • Loading branch information
pp449 authored Jan 5, 2024
2 parents 3e4d3cd + 37f79ac commit 80116a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/config/crawlingURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const PKNU_URL = {
export const MAJOR_URL = {
spatial_information_system_engineering_notice:
'http://geoinfo.pknu.ac.kr/05piazza/08.php',
spatial_information_system_engineering_notice2:
'http://geoinfo.pknu.ac.kr/05piazza/08.php?p=2&key=&keyword=&bbscode=cate0501&reCategory=',
spatial_information_system_engineering_notice3:
'http://geoinfo.pknu.ac.kr/05piazza/08.php?p=3&key=&keyword=&bbscode=cate0501&reCategory=',
biomedical_engineering_notice:
'http://bme.pknu.ac.kr/bbs/board.php?bo_table=notice',
visual_design_notice: 'https://visual.pknu.ac.kr/visual/3674',
Expand Down
11 changes: 8 additions & 3 deletions src/crawling/noticeCrawling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,14 @@ export const noticeListCrawling = async (
const normalNotice: string[] = [];

if (link === MAJOR_URL.spatial_information_system_engineering_notice) {
const noticePage2Lists = await noticeListCrawling(link);
pinnedNotice.push(...noticePage2Lists.pinnedNotice);
normalNotice.push(...noticePage2Lists.normalNotice);
for (const spatialLink of [
MAJOR_URL.spatial_information_system_engineering_notice2,
MAJOR_URL.spatial_information_system_engineering_notice3,
]) {
const noticePage2Lists = await noticeListCrawling(spatialLink, link);
pinnedNotice.push(...noticePage2Lists.pinnedNotice);
normalNotice.push(...noticePage2Lists.normalNotice);
}
}

tableData.each((index, element) => {
Expand Down

0 comments on commit 80116a7

Please sign in to comment.