Skip to content

Commit

Permalink
Fix getMainCategory() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchypark committed Feb 25, 2024
1 parent 7d0f4f9 commit 845a1ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RoxygenNote: 7.2.3
Depends:
R (>= 3.5.0)
Encoding: UTF-8
LazyData: true
Suggests:
testthat,
devtools,
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# N2H4 0.8.4

* getMainCategory() 함수를 수정했습니다.
* Fix getMainCategory() function.

# N2H4 0.8.3

* 페이지 구조가 변하여 getUrlList() 함수와 getMaxPageNum() 함수를 사용할 수 없어 제거하였습니다.
Expand Down
8 changes: 4 additions & 4 deletions R/getCategory.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ getMainCategory <- function() {
rvest::html_attr("href") -> links

titles <-
titles[grep("\\/main\\/main.naver\\?mode=LSD&mid=shm&sid1=1", links)]
titles[grep("section", links)]
titles <- trimws(titles)
links <-
links[grep("\\/main\\/main.naver\\?mode=LSD&mid=shm&sid1=1", links)]
links[grep("section", links)]

sid1 <- sapply(strsplit(links, "="),
sid1 <- sapply(strsplit(links, "/"),
function(x) {
x[4]
x[5]
})

urls <-
Expand Down
1 change: 1 addition & 0 deletions man/N2H4-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 845a1ff

Please sign in to comment.