BNO

In[]:=
b=StartWebSession[]
Out[]=
WebSessionObject
Browser: Chrome
​
Session ID: 4e52eb3b209ae4f9924d4c4801ff9fbb

In[]:=
WebExecute[b,"OpenWebPage""https://bnonews.com/index.php/2020/02/the-latest-coronavirus-cases/"]
Out[]=
Success
✓
Message: Page https://bnonews.com/index.php/2020/02/the-latest-coronavirus-cases/ opened successfully.
Tag: OpenWebPage

In[]:=
html=WebExecute[b,"JavascriptExecute""return document.getElementsByClassName('wp-block-table')[0].innerHTML"]
Out[]=
<tbody><tr><td><strong>MAINLAND CHINA</strong></td><td><strong>Cases</strong></td><td><strong>Deaths</strong></td><td><strong>Notes</strong></td><td><strong>Links</strong></td></tr><tr><td>Hubei province <br>(including Wuhan)</td><td>29,631</td><td>871</td><td>4,269 serious, 1,236 critical</td><td><a href="http://wjw.hubei.gov.cn/fbjd/dtyw/202002/t20200210_2022514.shtml" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Source</a></td></tr><tr><td>Other regions</td><td>10,540</td><td>37</td><td>979 serious/critical</td><td><a href="http://www.nhc.gov.cn/yjb/s7860/202002/167a0e01b2d24274b03b2ca961107929.shtml" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Source</a></td></tr><tr><td><strong>TOTAL</strong></td><td><strong>40,171</strong></td><td><strong>908</strong></td><td><strong>6,484 serious<br>3,281 recovered<br>23,589 suspected</strong></td><td></td></tr></tbody>
In[]:=
xml=ImportString[html,{"HTML","XMLObject"}];
In[]:=
Cases[xml,XMLElement["tr",{},list_]list,∞]/.{XMLElement["td",_,x_]x}/.{XMLElement["strong",{},x_]x}/.{XMLElement["a",{___,"href"url_,___},_]URL[url]}//.{{s_String}s}/.{XMLElement["br",{"clear""none"},{}]Nothing}/.{{}Missing["NotAvailable"]}/.{{"Hubei province ","(including Wuhan)"}"Hubei province"}/.{"MAINLAND CHINA"|"REGIONS"|"INTERNATIONAL""region"}//Grid
In[]:=
scrape[n_]:=Module[{html,xml,ds},​​html=WebExecute[b,"JavascriptExecute""return document.getElementsByClassName('wp-block-table')["<>ToString[n]<>"].innerHTML"];​​xml=ImportString[html,{"HTML","XMLObject"}];xml=Cases[xml,XMLElement["tr",{},list_]list,∞]/.{XMLElement["td",_,x_]x}/.{XMLElement["strong",{},x_]x}/.{XMLElement["a",{___,"href"url_,___},_]URL[url]}//.{{s_String}s}/.{XMLElement["br",{"clear""none"},{}]Nothing}/.{{}Missing["NotAvailable"]}/.{{"Hubei province ","(including Wuhan)"}"Hubei province"}/.{"MAINLAND CHINA"|"REGIONS"|"INTERNATIONAL""region"};​​ds=Dataset[Map[AssociationThread[First[xml]#]&,Most[Rest[xml]]]];​​ds[All,<|"region"Interpreter["AdministrativeDivision"|"Country"][#["region"]],"cases"Interpreter["Number"][StringReplace[#Cases,"*"""]],"deaths"Interpreter["Number"][#Deaths],"notes"#Notes,"links"#Links|>&]​​]
In[]:=
scrape[0]
Out[]=
region
cases
deaths
notes
links
Hubei, China
19665
550
2,328 serious, 756 critical
URL
http://wjw.hubei.gov.cn/fbjd/dtyw/202002/t20200206_2019847.shtml

Zhejiang, China
954
0
51 serious, 15 critical
URL
https://www.zjwjw.gov.cn/art/2020/2/6/art_1202101_41881119.html

Guangdong, China
970
0
84 serious, 32 critical
URL
http://wsjkw.gd.gov.cn/zwyw_yqxx/content/post_2885363.html

Henan, China
851
2
38 serious, 24 critical
URL
https://m.weibo.cn/status/4468885493786791

Hunan, China
711
0
61 serious
URL
http://wjw.hunan.gov.cn/wjw/xxgk/gzdt/zyxw_1/202002/t20200206_11171582.html

Anhui, China
591
0
6 critical
URL
http://wjw.ah.gov.cn/news_details_54599.html

Jiangxi, China
600
0
53 serious
URL
http://hc.jiangxi.gov.cn/doc/2020/02/06/138208.shtml

Chongqing, China
400
2
32 serious, 11 critical
URL
http://wsjkw.cq.gov.cn/tzgg/20200206/252355.html

Jiangsu, China
373
0
3 serious
URL
https://m.weibo.cn/status/4468889100612835

Sichuan, China
322
1
18 critical
URL
https://m.weibo.cn/detail/4468886642966555

Shandong, China
347
0
24 serious, 7 critical
URL
https://m.weibo.cn/detail/4468984080203682

Beijing, China
274
1
1+ critical
URL
http://wjw.beijing.gov.cn/xwzx_20031/wnxw/202002/t20200206_1625583.html

Shanghai, China
257
1
8 serious, 8 critical
URL
https://m.weibo.cn/status/4468971530985983

Fujian, China
215
0
12 serious, 8 critical
URL
https://mp.weixin.qq.com/s?__biz=MzA5MTM0NjAxNg==&mid=2650269241&idx=1&sn=9d36727af09b49bb2c9163dddca4634b&chksm=887e8336bf090a20eb7564a930bcbf83dfcdd4c012244508a37198c221d329c51095fe9ea61c&token=1602347766&lang=zh_CN#rd&url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzA5MTM0NjAxNg%3D%3D%26mid%3D2650269241%26idx%3D1%26sn%3D9d36727af09b49bb2c9163dddca4634b%26chksm%3D887e8336bf090a20eb7564a930bcbf83dfcdd4c012244508a37198c221d329c51095fe9ea61c%26token%3D1602347766%26lang%3Dzh_CN%23rd&share_menu=1&sinainternalbrowser=topnav&mid=4468932695565279&luicode=10000011&lfid=100103type%3D1%26q%3D%E7%A6%8F%E5%BB%BA%E6%96%B0%E5%A2%9E%E6%96%B0%E5%9E%8B%E8%82%BA%E7%82%8E%E7%A1%AE%E8%AF%8A%E7%97%85%E4%BE%8B10%E4%BE%8B+%E7%B4%AF%E8%AE%A1%E7%A1%AE%E8%AF%8A215%E4%BE%8B&u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzA5MTM0NjAxNg%3D%3D%26mid%3D2650269241%26idx%3D1%26sn%3D9d36727af09b49bb2c9163dddca4634b%26chksm%3D887e8336bf090a20eb7564a930bcbf83dfcdd4c012244508a37198c221d329c51095fe9ea61c%26token%3D1602347766%26lang%3Dzh_CN%23rd

Shaanxi, China
173
0
1+ serious
URL
http://sxwjw.shaanxi.gov.cn/art/2020/2/6/art_9_67788.html

Guangxi, China
168
0
12 serious, 3 critical
URL
http://wsjkw.gxzf.gov.cn/zhuantiqu/ncov/ncovyqtb/2020/0206/68435.html

Yunnan, China
133
0
16 serious, 2 critical
URL
https://m.weibo.cn/status/4469022416518876

Hebei, China
157
1
13 serious
URL
http://www.hebwst.gov.cn/index.do?id=397080&templet=content&cid=14

Heilongjiang, China
227
3
24 serious
URL
http://wsjkw.hlj.gov.cn/index.php/Home/Zwgk/show/newsid/7760/navid/42/stypeid/

Liaoning, China
94
0
7 serious, 1 critical
URL
https://m.weibo.cn/status/4469085037161884

rows 1–20 of 31
In[]:=
scrape[1]
Out[]=
region
cases
deaths
notes
links
Hong Kong
24
1
-
URL
https://www.chp.gov.hk/files/pdf/enhanced_sur_pneumonia_wuhan_eng.pdf

Taiwan, Taiwan
16
0
1 recovered
URL
https://www.cna.com.tw/news/firstnews/202002065014.aspx

Macau, Macau
10
0
-
URL
https://news.gov.mo/detail/zh-hant/N20BDPAzBd?3

In[]:=
cc=scrape[2]
Out[]=
region
cases
deaths
notes
links
Japan
45
0
-
URL
https://www.mhlw.go.jp/stf/newpage_09340.html

Thailand
25
0
1 serious, 9 recovered
URL
https://www.bangkokpost.com/thailand/general/1851149/first-local-virus-patient-cured

Singapore
30
0
1 critical, 1 recovered
URL
https://www.moh.gov.sg/news-highlights/details/four-more-confirmed-cases-of-novel-coronavirus-infection-in-singapore

South Korea
23
0
1 recovered
URL
https://www.yna.co.kr/view/AKR20200205106500017

Australia
15
0
3 recovered
URL
https://www.health.qld.gov.au/news-events/doh-media-releases/releases/queensland-coronavirus-update5

Germany
13
0
-
URL
https://www.stmgp.bayern.de/presse/aktuelle-informationen-zur-coronavirus-lage-in-bayern-bayerisches-gesundheitsministerium-13/

Malaysia
14
0
13 stable, 1 recovered
URL
https://twitter.com/KKMPutrajaya/status/1225324556979560448

United States
12
0
1 recovered
URL
https://wtmj.com/news/2020/02/05/first-wisconsin-coronavirus-case-confirmed/

Vietnam
12
0
3 recovered
URL
https://vietnamnet.vn/vn/suc-khoe/suc-khoe-24h/viet-nam-them-2-ca-duong-tinh-virus-corona-deu-la-nguoi-than-nu-cong-nhan-ve-tu-vu-han-613719.html

France
6
0
1 serious
URL
https://www.francetvinfo.fr/sante/maladie/coronavirus/coronavirus-2019-ncov-les-six-cas-confirmes-en-france-sont-dans-un-etat-stable-selon-le-directeur-general-de-la-sante_3811051.html

United Arab Emirates
5
0
Stable
URL
https://www.wam.ae/en/details/1395302820367

Canada
5
0
-
URL
https://www.cbc.ca/news/canada/british-columbia/2nd-case-of-coronavirus-confirmed-in-b-c-1.5451915

United Kingdom
3
0
-
URL
https://www.gov.uk/government/news/cmo-confirms-third-case-of-coronavirus-in-england

Russia
2
0
-
URL
https://tass.ru/obschestvo/7656549

Philippines
3
1
-
URL
https://www.youtube.com/watch?v=_pIluXrMHCk

India
3
0
Stable
URL
https://www.pib.gov.in/PressReleseDetail.aspx?PRID=1601681

Italy
2
0
2 serious
URL
http://www.rainews.it/dl/rainews/articoli/Conte-due-casi-di-coronavirus-accertati-in-Italia-60b4294a-3a3f-4b05-ad1f-b096d1c60110.html

Nepal
1
0
-
URL
https://kathmandupost.com/2/2020/01/24/officials-confirm-novel-coronavirus-in-nepali-man-who-returned-from-wuhan-earlier-this-month

Cambodia
1
0
1 recovered
URL
https://twitter.com/VOD_English/status/1221769368180121603

Sri Lanka
1
0
1 recovered
URL
https://www.reuters.com/article/us-health-china-sri-lanka/sri-lanka-confirms-first-case-of-coronavirus-health-official-idUSKBN1ZQ1WF

rows 1–20 of 24
In[]:=
dsFinal=Join[scrape[0],scrape[1],scrape[2]]
Out[]=
region
cases
deaths
notes
links
Hubei, China
19665
550
2,328 serious, 756 critical
URL
http://wjw.hubei.gov.cn/fbjd/dtyw/202002/t20200206_2019847.shtml

Zhejiang, China
954
0
51 serious, 15 critical
URL
https://www.zjwjw.gov.cn/art/2020/2/6/art_1202101_41881119.html

Guangdong, China
970
0
84 serious, 32 critical
URL
http://wsjkw.gd.gov.cn/zwyw_yqxx/content/post_2885363.html

Henan, China
851
2
38 serious, 24 critical
URL
https://m.weibo.cn/status/4468885493786791

Hunan, China
711
0
61 serious
URL
http://wjw.hunan.gov.cn/wjw/xxgk/gzdt/zyxw_1/202002/t20200206_11171582.html

Anhui, China
591
0
6 critical
URL
http://wjw.ah.gov.cn/news_details_54599.html

Jiangxi, China
600
0
53 serious
URL
http://hc.jiangxi.gov.cn/doc/2020/02/06/138208.shtml

Chongqing, China
400
2
32 serious, 11 critical
URL
http://wsjkw.cq.gov.cn/tzgg/20200206/252355.html

Jiangsu, China
373
0
3 serious
URL
https://m.weibo.cn/status/4468889100612835

Sichuan, China
322
1
18 critical
URL
https://m.weibo.cn/detail/4468886642966555

Shandong, China
347
0
24 serious, 7 critical
URL
https://m.weibo.cn/detail/4468984080203682

Beijing, China
274
1
1+ critical
URL
http://wjw.beijing.gov.cn/xwzx_20031/wnxw/202002/t20200206_1625583.html

Shanghai, China
257
1
8 serious, 8 critical
URL
https://m.weibo.cn/status/4468971530985983

Fujian, China
215
0
12 serious, 8 critical
URL
https://mp.weixin.qq.com/s?__biz=MzA5MTM0NjAxNg==&mid=2650269241&idx=1&sn=9d36727af09b49bb2c9163dddca4634b&chksm=887e8336bf090a20eb7564a930bcbf83dfcdd4c012244508a37198c221d329c51095fe9ea61c&token=1602347766&lang=zh_CN#rd&url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzA5MTM0NjAxNg%3D%3D%26mid%3D2650269241%26idx%3D1%26sn%3D9d36727af09b49bb2c9163dddca4634b%26chksm%3D887e8336bf090a20eb7564a930bcbf83dfcdd4c012244508a37198c221d329c51095fe9ea61c%26token%3D1602347766%26lang%3Dzh_CN%23rd&share_menu=1&sinainternalbrowser=topnav&mid=4468932695565279&luicode=10000011&lfid=100103type%3D1%26q%3D%E7%A6%8F%E5%BB%BA%E6%96%B0%E5%A2%9E%E6%96%B0%E5%9E%8B%E8%82%BA%E7%82%8E%E7%A1%AE%E8%AF%8A%E7%97%85%E4%BE%8B10%E4%BE%8B+%E7%B4%AF%E8%AE%A1%E7%A1%AE%E8%AF%8A215%E4%BE%8B&u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzA5MTM0NjAxNg%3D%3D%26mid%3D2650269241%26idx%3D1%26sn%3D9d36727af09b49bb2c9163dddca4634b%26chksm%3D887e8336bf090a20eb7564a930bcbf83dfcdd4c012244508a37198c221d329c51095fe9ea61c%26token%3D1602347766%26lang%3Dzh_CN%23rd

Shaanxi, China
173
0
1+ serious
URL
http://sxwjw.shaanxi.gov.cn/art/2020/2/6/art_9_67788.html

Guangxi, China
168
0
12 serious, 3 critical
URL
http://wsjkw.gxzf.gov.cn/zhuantiqu/ncov/ncovyqtb/2020/0206/68435.html

Yunnan, China
133
0
16 serious, 2 critical
URL
https://m.weibo.cn/status/4469022416518876

Hebei, China
157
1
13 serious
URL
http://www.hebwst.gov.cn/index.do?id=397080&templet=content&cid=14

Heilongjiang, China
227
3
24 serious
URL
http://wsjkw.hlj.gov.cn/index.php/Home/Zwgk/show/newsid/7760/navid/42/stypeid/

Liaoning, China
94
0
7 serious, 1 critical
URL
https://m.weibo.cn/status/4469085037161884

rows 1–20 of 58