text:
Q: Some tags are not read with read_html I used read_html to read this website (Korean portal site for stock trading market) "https://finance.naver.com/sise/etf.nhn"
When I saw the elements of the webpage, I see a table, and tags such as tbody, tr, td, a under the table.
However, read_html does not read these tags but properly. I checked it with xml_structure. There is only tbody with an ID, but nothing else.
I do not know other way to read website but read_html.
url <- "https://finance.naver.com/sise/etf.nhn"

temp <- url %>%
  read_html(encoding="iso-8859-1") %>%
  xml_find_all(., "//td[@class = 'ctg']") %>%
  as_list()

This did not give me anything, so I double-checked it with xml_structure.
xml_structure(read_html(url, encoding="iso-8859-1"))

And it gives the following:
There should be lots of "tr"s and "td"s under the "tbody", but nothing.
        <table [summary, class, cellspacing, cellpadding]>
          <caption>
            {text}
          {text}
          <colgroup>
            <col [width]>
            <col [width]>
            <col [width]>
            <col [width]>
            <col [width]>
            <col [width]>
            <col [width]>
            <col [width]>
            <col [width]>
          <tbody [id]>
        <p [class]>

No tags under the tbody tag.
By the way, what I wanted to get eventually was the contents of a href under td so that I can scrape the 6-digit stock codes.
Many thanks.

A: I recommend RSelenium for crawling java script website.(자바 스크립트로 된 사이트는 RSelenium으로 크롤링 하는게 좋습니다. 일반적인 html 파일과 다르게 반응형으로 되어 있기 때문이죠.)
library(RSelenium)
url <- "https://finance.naver.com/sise/etf.nhn"
ch=wdman::chrome(port=4445L) #Set channel. If you have problem aboout chrome driver, please comment this answer.(크롬 드라이버로 문제가 생기면 코멘트를 달아주세요 답변해드릴게요)
remDr=remoteDriver(port=4445L, browserName='chrome')
remDr$open() #Open remote browser.
remDr$navigate(url) #Change browser to your web site.
source<-remDr$getPageSource()[[1]]
main <- read_html(source)
dt <- main%>%html_table(fill = TRUE)

dt
[[1]]
                              종목명  현재가 전일비 등락률     NAV 3개월수익률     거래량 거래대금(백만) 시가총액(억) NA
1                                                NA                                                                   NA
2                          KODEX 200  25,540    175 +0.69%  25,557      -5.86%  3,033,694         77,550       57,810 NA
3                          TIGER 200  25,530    170 +0.67%  25,555      -5.82%  1,854,944         47,440       26,947 NA
4                     KODEX 레버리지  10,690    150 +1.42%  10,701     -12.45% 19,195,363        205,260       23,497 NA
5                     KODEX 단기채권 101,235      5  0.00% 101,231      +0.57%     35,383          3,581       13,738 NA
6                         KBSTAR 200  25,525    170 +0.67%  25,554      -5.88%    204,864          5,239       11,537 NA
7                                                NA                                                                   NA
8                                                NA                                                                   NA
9                                                NA                                                                   NA
10          KODEX 코스닥150 레버리지   6,125     40 -0.65%   6,160     -46.37% 33,056,841        203,228       11,276 NA
11     KODEX 종합채권(AA-이상)액티브 109,320    125 -0.11% 109,301      +3.30%     17,299          1,892       10,505 NA
12                    KODEX 삼성그룹   6,000     85 +1.44%   5,995      -4.38%     81,509            488        9,900 NA
13                       KODEX 200TR   8,015     60 +0.75%   8,014      -5.76%    611,115          4,900        9,245 NA
14                KODEX 단기채권PLUS 101,300     10 +0.01% 101,295      +0.60%      7,626            772        8,866 NA
15                                               NA                                                                   NA
16                                               NA                                                                   NA
17                                               NA                                                                   NA
18                  TIGER 단기통안채 101,085      5  0.00% 101,083      +0.43%     43,335          4,380        8,364 NA
19                        HANARO 200  25,550    180 +0.71%  25,566      -5.77%     63,381          1,621        7,780 NA
20               KODEX MSCI Korea TR   7,890    100 +1.28%   7,895      -5.45%    274,458          2,166        7,685 NA
21                       ARIRANG 200  25,645    175 +0.69%  25,659      -5.65%    311,488          8,002        7,411 NA
22                  KODEX Top5PlusTR  12,100    110 +0.92%  12,104      -4.12%      1,118             13        6,534 NA
23                                               NA                                                                   NA
24                                               NA                                                                   NA
25                                               NA                                                                   NA
26                         KOSEF 200  25,765    185 +0.72%  25,770      -5.86%    162,394          4,190        6,531 NA
27                        KINDEX 200  25,670    230 +0.90%  25,651      -5.73%    282,744          7,260        6,302 NA
28                  KODEX 코스닥 150   8,530     25 -0.29%   8,562     -25.47%  4,096,335         34,976        6,278 NA
29               TIGER MSCI Korea TR   9,820      0  0.00%   9,903      -5.82%          0              0        6,177 NA
30                      KODEX 코스피  19,495    245 +1.27%  19,486      -7.45%     39,984            779        5,166 NA
31                                               NA                                                                   NA
32                                               NA                                                                   NA
33                                               NA                                                                   NA
34                      KODEX 인버스   7,450     55 -0.73%   7,456      +6.50% 10,460,449         77,916        4,924 NA
35                       TIGER TOP10   7,930    115 +1.47%   7,904      -2.34%      3,182             25        4,865 NA
36                       SMART 200TR   8,340     70 +0.85%   8,331      -5.60%     18,004            150        4,566 NA
37              TIGER 단기채권액티브  50,590      0  0.00%  50,592      +0.47%      3,894            197        4,404 NA
38             KODEX 200선물인버스2X   8,515    115 -1.33%   8,521     +12.63% 17,984,754        152,854        4,283 NA
39                                               NA                                                                   NA
40                                               NA                                                                   NA
41                                               NA                                                                   NA
42            KODEX 선진국MSCI World  14,075    115 +0.82%     N/A      +2.55%      3,666             51        3,857 NA
43                  ARIRANG 고배당주  11,040      0  0.00%  11,030      -8.00%    145,379          1,607        3,580 NA
44                   TIGER 코스닥150   8,585     15 -0.17%   8,599     -25.33%    610,728          5,246        3,216 NA
45                       KOSEF 200TR  29,060    220 +0.76%  29,076      -5.91%      8,055            234        2,644 NA
46                     KBSTAR 코스피  19,520    200 +1.04%  19,483      -7.66%        767             14        2,372 NA
47                                               NA                                                                   NA
48                                               NA                                                                   NA
49                                               NA                                                                   NA
50                 KBSTAR 단기통안채 104,700     10 -0.01% 104,705      +0.54%        318             33        2,368 NA
51   TIGER 차이나CSI300레버리지(합..  17,010    440 -2.52%     N/A      -1.96%    101,746          1,761        2,347 NA
52                TIGER 차이나CSI300   8,325    115 -1.36%     N/A      +0.48%     99,383            834        2,264 NA
53             KBSTAR 대형고배당10TR   9,970     75 +0.76%   9,971      -4.04%        740              7        2,178 NA
54           KINDEX 베트남VN30(합성)  13,530     85 +0.63%     N/A      +3.56%    107,419          1,451        2,165 NA
55                                               NA                                                                   NA
56                                               NA                                                                   NA
57                                               NA                                                                   NA
58                      TIGER 200 IT  19,505    320 +1.67%  19,495      -3.46%     32,063            625        2,146 NA
59             KINDEX 중국본토CSI300  21,905     70 -0.32%     N/A      +1.25%     94,858          2,072        2,037 NA
60         KODEX 코스닥150선물인버스   9,555     40 +0.42%   9,567     +31.52% 29,789,385        284,731        1,901 NA
61                 KINDEX 단기통안채 101,220      0  0.00% 101,220      +0.48%     13,250          1,341        1,843 NA
62                      TIGER 코스피  19,495    180 +0.93%  19,490      -7.49%      6,102            119        1,794 NA
63                                               NA                                                                   NA
64                                               NA                                                                   NA
65                                               NA                                                                   NA
66                TIGER 중국소비테마   6,510      0  0.00%   6,515     -17.80%      7,005             45        1,791 NA
67  TIGER 글로벌4차산업혁신기술(합..  11,600    185 +1.62%     N/A      +1.89%     43,939            509        1,775 NA
68                  KBSTAR 코스닥150   8,445     25 -0.30%   8,464     -25.66%     12,069            101        1,579 NA
69                    KODEX 배당가치   9,540     60 +0.63%   9,538         N/A        329              3        1,498 NA
70                    TIGER 경기방어   9,195     70 +0.77%   9,193     -15.60%     19,365            178        1,416 NA
71                                               NA                                                                   NA
72                                               NA                                                                   NA
73                                               NA                                                                   NA
74    KODEX 단기변동금리부채권액티브 101,085     15 +0.01% 101,083      +0.41%      1,010            102        1,350 NA
75                          파워 200  25,970    175 +0.68%  25,984      -5.90%         50              1        1,273 NA
76             TIGER 200선물레버리지   8,040    115 +1.45%   8,039     -12.08%    273,474          2,200        1,118 NA
77                 HANARO 단기통안채 101,550      5  0.00% 101,550      +0.48%          3              0        1,080 NA
78           TIGER 미국S&P500선물(H)  34,445    360 +1.06%     N/A      +1.82%    141,474          4,865        1,076 NA
79                                               NA                                                                   NA
80                                               NA                                                                   NA
81                                               NA                                                                   NA
82                      KODEX KRX300  11,630     80 +0.69%  11,643      -7.70%     21,162            246        1,070 NA
83             TIGER 200선물인버스2X   8,625    165 -1.88%   8,660     +12.01%    983,282          8,500        1,052 NA
84      KBSTAR 코스닥150선물레버리지   5,965     45 -0.75%   5,963     -45.90%    156,885            939        1,041 NA
85                 KODEX 골드선물(H)  10,820     15 +0.14%     N/A     +16.47%    312,156          3,376        1,006 NA
86           KBSTAR 단기국공채액티브 101,615      5  0.00% 101,611      +0.80%    115,631         11,750          966 NA
87                                               NA                                                                   NA
88                                               NA                                                                   NA
89                                               NA                                                                   NA
90                   KODEX 국고채3년  57,155     60 -0.10%  57,151      +1.77%      2,832            161          960 NA
91                       TIGER 200TR  13,060    110 +0.85%  13,046      -6.21%          1              0          953 NA
92                  ARIRANG 코스피50  17,320    195 +1.14%  17,323      -4.36%     51,575            894          909 NA
93                   KOSEF 코스닥150   4,230      5 +0.12%   4,231     -25.98%        367              1          874 NA
94                    TIGER 헬스케어  23,610    390 +1.68%  23,700     -28.30%     46,091          1,085          869 NA
95                                               NA                                                                   NA
96                                               NA                                                                   NA
97                                               NA                                                                   NA
98                   KOSEF 통안채1년 102,430     10 -0.01% 102,432      +0.86%     40,879          4,187          850 NA
99             KBSTAR 중기우량회사채 105,455     65 -0.06% 105,428      +1.70%      2,136            225          844 NA
100         TIGER 코스닥150 레버리지   6,435     30 -0.46%   6,444     -46.42%  1,054,878          6,802          827 NA
 [ reached 'max' / getOption("max.print") -- omitted 596 rows ]

As you know, this website's table have spaces repeatably. You must do data cleansing processing.(알다시피, 해당 웹사이트 테이블에 공란이 존재합니다. 그래서 반복적으로 발생하는 na 값들을 삭제하는 작업을 수행하셔야 합니다.)

redpajama_set_name: RedPajamaStackExchange


text:
Tunisia's aging president hospitalized with serious illness
by: BOUAZZA BEN BOUAZZA, Associated Press
Posted: Jun 27, 2019 / 08:35 AM EDT / Updated: Jun 27, 2019 / 04:01 PM EDT
FILE – In this photo taken on Oct.3, 2018 Tunisian President Beji Caid Essebsi is pictured during a joint press conference with his Djibouti counterpart at the presidential palace in Carthage, near the Tunisian capital, Tunis. Tunisia's 92-year-old president Beji Caid Essebsi has been taken to a military hospital after falling seriously ill. (AP Photo/Hassene Dridi, File)
TUNIS, Tunisia (AP) — Tunisia's first democratically elected president, 92-year-old Beji Caid Essebsi, has been taken to a military hospital after falling seriously ill.
Essebsi's office announced his hospitalization Thursday. The president also was briefly hospitalized last week.
Essebsi won office in 2014 in the wake of the country's Arab Spring uprising.
He recently announced he wouldn't run in the election set for November, saying a younger person should lead the country. Essebsi has seemed increasingly frail during recent appearances.
If the president is incapacitated, Tunisia's Constitution calls for the president of parliament to take over until an election is held.
Essebsi's centrist movement presents itself as a bulwark against Islamic extremism and a beacon of stability amid the rocky transition to democracy in Tunisia.
However, the president has been unable to calm the political and economic chaos that have plague Tunisia. Twin suicide bombings were carried out Thursday in the capital, Tunis.
Lawmaker Mustafa Ben Ahmed sought to calm fears about the president's health and the country's leadership.
"We wish him well. We have the Tunisian Constitution that guides us in all that is necessary in the absence of the president," he said.
Mehdi El Arem in Tunis and Lori Hinnant in Paris contributed.
More International Stories
by RAFIQ MAQBOOL, Associated Press / Jul 17, 2019
MUMBAI, India (AP) — Rescuers found 14 bodies and pulled out 11 survivors as they began winding down operations at the site of a dilapidated building that collapsed in India's financial capital of Mumbai, an official said Wednesday.
Bijendra Dahiya, a National Disaster Response Force official, said workers were still looking for two to three people feared trapped in the rubble.
CARACAS, Venezuela (AP) — Authorities in Venezuela on Tuesday released from prison a young musician who was jailed six weeks ago after taking to social media to vent her frustration against President Nicolás Maduro's government
Karen Palacios blasted the government in a message that went viral after losing her job as top clarinetist in the National Philharmonic. Her mother says a week later two strangers appeared at their home saying the 25-year-old was needed for an interview at the presidential palace.
Head of UN nuclear watchdog reported to be stepping down
VIENNA (AP) — The United Nations' nuclear watchdog says it can't confirm rumors that its director general is stepping down for health reasons.
The International Atomic Energy Agency's press office told The Associated Press late Tuesday that Director General Yukiya Amano was "in contact with members of the board of governors regarding his future plans."

redpajama_set_name: RedPajamaCommonCrawl


For anyone who wants to learn the fundamentals of branding in an approachable way without poring over dense text or hiring an expensive consultant, Star Brands presents a unique model that offers structured guidance and professional tips for building, managing, and marketing any brand. Created by savvy brand manager Carolina Rogoll, the star brand model is a perfect intersection of solid marketing and management theory with an approachable, visually oriented design.
"In her position as both a brand manager at the world's largest consumer goods company and as an educator in the world's first graduate program in branding, Rogoll is uniquely qualified to reveal the wizardry behind the curtain and, in doing so, she bestows upon her reader the very tools necessary to grasp this elusive but ultimately attainable creative business process."
Carolina Rogoll has been building some of the world's most beloved brands for over ten years, as well as serving on the faculty of the first ever Masters in Branding program where she created the inaugural (and very popular) brand management seminar.
She has a strong track record in brand building, business management and coaching.