Skip to content

Commit 845a1ff

Browse files
committed
Fix getMainCategory() function.
1 parent 7d0f4f9 commit 845a1ff

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

DESCRIPTION

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ RoxygenNote: 7.2.3
1616
Depends:
1717
R (>= 3.5.0)
1818
Encoding: UTF-8
19-
LazyData: true
2019
Suggests:
2120
testthat,
2221
devtools,

NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# N2H4 0.8.4
22

3+
* getMainCategory() 함수를 수정했습니다.
4+
* Fix getMainCategory() function.
5+
36
# N2H4 0.8.3
47

58
* 페이지 구조가 변하여 getUrlList() 함수와 getMaxPageNum() 함수를 사용할 수 없어 제거하였습니다.

R/getCategory.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ getMainCategory <- function() {
4848
rvest::html_attr("href") -> links
4949

5050
titles <-
51-
titles[grep("\\/main\\/main.naver\\?mode=LSD&mid=shm&sid1=1", links)]
51+
titles[grep("section", links)]
5252
titles <- trimws(titles)
5353
links <-
54-
links[grep("\\/main\\/main.naver\\?mode=LSD&mid=shm&sid1=1", links)]
54+
links[grep("section", links)]
5555

56-
sid1 <- sapply(strsplit(links, "="),
56+
sid1 <- sapply(strsplit(links, "/"),
5757
function(x) {
58-
x[4]
58+
x[5]
5959
})
6060

6161
urls <-

man/N2H4-package.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)