From c2766c50a922a24185cbbc9cfef856805c5c0609 Mon Sep 17 00:00:00 2001 From: koogawa Date: Wed, 8 Apr 2020 10:29:33 +0900 Subject: [PATCH 01/40] add auto_merge label --- .github/workflows/news_scraping.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 3122329db1538..9d0620450a9f3 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -35,6 +35,7 @@ jobs: commit-message: 'Update news.json' branch: news base: master + labels: auto_merge branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' From 3d6ac30d38cf5155cce0369a65b4dbe590f6d3a8 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 18:14:12 +0900 Subject: [PATCH 02/40] get diff --- .github/workflows/news_scraping.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 9d0620450a9f3..ede24e6f0e923 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -1,7 +1,7 @@ name: scraping news -on: - schedule: - - cron: '0 */6 * * *' +on: push + # schedule: + # - cron: '0 */6 * * *' jobs: scraping: runs-on: ubuntu-latest @@ -39,3 +39,16 @@ jobs: branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' + - name: Get Diff Action + uses: technote-space/get-diff-action@v1.2.2 + - name: Test + run: echo `diff ari` + if: steps.git_diff.outputs.diff + - name: Test lines + run: echo ${{ steps.git_diff.outputs.lines }} + - name: Test counr + run: echo ${{ steps.git_diff.outputs.count }} + - name: Test diff + run: echo ${{ steps.git_diff.outputs.diff }} + - name: Test insertions + run: echo ${{ steps.git_diff.outputs.insertions }} From 675244c07d711aa28f767605b939f421751dc564 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 20:29:22 +0900 Subject: [PATCH 03/40] Create scraping_data --- .github/workflows/news_scraping.yml | 2 +- scraping_data.rb | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 scraping_data.rb diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index ede24e6f0e923..e6ec629773934 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -28,7 +28,7 @@ jobs: gem install bundler bundle update --bundler bundle install - ruby scraping.rb + ruby scraping_data.rb - name: Create Pull Request uses: peter-evans/create-pull-request@v2 with: diff --git a/scraping_data.rb b/scraping_data.rb new file mode 100644 index 0000000000000..d2f85f788f648 --- /dev/null +++ b/scraping_data.rb @@ -0,0 +1,17 @@ +require 'selenium-webdriver' + +driver = Selenium::WebDriver.for :remote, desired_capabilities: :chrome, url: "http://#{ENV['SELENIUM_HOST']}:4444/wd/hub" + +# スクレイピング +driver.navigate.to(ENV['URL']) +list_table = driver.find_element(:class => "list_table") +# dates = list_table.find_elements(:class => "date") +urls = list_table.find_elements(:tag_name => "a") +# texts = list_table.find_elements(:tag_name => "a") +count = urls.length - 1 +url = urls[count].attribute("href") +puts "news url = " +puts url + +exit + From c5d665de738fb84600235407fd4a66266d6da35d Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:00:28 +0900 Subject: [PATCH 04/40] puts uls[i].text --- scraping_data.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index d2f85f788f648..bcaf7fb1e614c 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -5,13 +5,20 @@ # スクレイピング driver.navigate.to(ENV['URL']) list_table = driver.find_element(:class => "list_table") -# dates = list_table.find_elements(:class => "date") urls = list_table.find_elements(:tag_name => "a") # texts = list_table.find_elements(:tag_name => "a") -count = urls.length - 1 -url = urls[count].attribute("href") +# count = urls.length - 1 +url = urls[0].attribute("href") puts "news url = " puts url +driver.navigate.to(url) +# noicon +uls = list_table.find_elements(:class => "noicon") +count = uls.length - 1 +for i in 0..count do + puts uls[i].text +end + exit From 001911c39207094dbb55a15b86c85e7710675545 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:09:55 +0900 Subject: [PATCH 05/40] Update driver --- scraping_data.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraping_data.rb b/scraping_data.rb index bcaf7fb1e614c..99977af347f45 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -14,7 +14,7 @@ driver.navigate.to(url) # noicon -uls = list_table.find_elements(:class => "noicon") +uls = driver.find_elements(:class => "noicon") count = uls.length - 1 for i in 0..count do puts uls[i].text From 416db4e632fd57e47e49dc4e6d2250a4dd744cb0 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:18:59 +0900 Subject: [PATCH 06/40] Use match --- scraping_data.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 99977af347f45..10dd422f8fa67 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -12,12 +12,14 @@ puts "news url = " puts url -driver.navigate.to(url) +driver.navigate.to("https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html") # noicon uls = driver.find_elements(:class => "noicon") count = uls.length - 1 for i in 0..count do - puts uls[i].text + puts "---" + ul = uls[i].text + p uls[i].text.match(/居住地(\w+)/) end exit From 7d9982c65af43e603bd40e6d26db3bf5e8d110e0 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:24:18 +0900 Subject: [PATCH 07/40] Use multi match --- scraping_data.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 10dd422f8fa67..03991d9ff740a 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -18,8 +18,8 @@ count = uls.length - 1 for i in 0..count do puts "---" - ul = uls[i].text - p uls[i].text.match(/居住地(\w+)/) + ul = uls[i] + p ul.text.match(/居住地(\w+)/m) end exit From a4d311f6377f1fb741544d3d64333717e859a5e1 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:26:57 +0900 Subject: [PATCH 08/40] =?UTF-8?q?Get=20=E5=B9=B4=E9=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scraping_data.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scraping_data.rb b/scraping_data.rb index 03991d9ff740a..564fe6f5c2bab 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -19,7 +19,9 @@ for i in 0..count do puts "---" ul = uls[i] - p ul.text.match(/居住地(\w+)/m) + p ul.text + p ul.text.match(/(1)居住地(\w+)/m) + p ul.text.match(/(2)年齢(\w+)/m) end exit From 8aa87f4203626972ad4bd11a0bdcf2ac4a75b9d0 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:36:50 +0900 Subject: [PATCH 09/40] Update regex --- scraping_data.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 564fe6f5c2bab..43f5e6360a5fe 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -20,8 +20,9 @@ puts "---" ul = uls[i] p ul.text - p ul.text.match(/(1)居住地(\w+)/m) - p ul.text.match(/(2)年齢(\w+)/m) + p ul.text.match(/(1)居住地.+\n/m) + p ul.text.match(/(2)年齢(\w+)\n/m) + p ul.text.match(/(3)性別(\w+)\n/m) end exit From 6e02234e955c08b31bdc6af1dcc6e1988f4ac5a1 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:39:59 +0900 Subject: [PATCH 10/40] Update regex --- scraping_data.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 43f5e6360a5fe..780c1d3e09b5b 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -20,8 +20,8 @@ puts "---" ul = uls[i] p ul.text - p ul.text.match(/(1)居住地.+\n/m) - p ul.text.match(/(2)年齢(\w+)\n/m) + p ul.text.match(/(1)居住地(.+)/m) + p ul.text.match(/(2)年齢(.+)\n/m) p ul.text.match(/(3)性別(\w+)\n/m) end From b2106c58a0de4014864489783d1cd70d66538586 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:44:33 +0900 Subject: [PATCH 11/40] Update regex --- scraping_data.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 780c1d3e09b5b..fc2ed48f1161a 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -20,9 +20,9 @@ puts "---" ul = uls[i] p ul.text - p ul.text.match(/(1)居住地(.+)/m) - p ul.text.match(/(2)年齢(.+)\n/m) - p ul.text.match(/(3)性別(\w+)\n/m) + p ul.text.match(/^(1)居住地(.+)$/m) + p ul.text.match(/^(2)年齢(.+)$/m) + p ul.text.match(/^(3)性別(\w+)$/m) end exit From 18687f5a2f42aae467f5d5563eaff9a98ec0ce22 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:48:23 +0900 Subject: [PATCH 12/40] Update regex --- scraping_data.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index fc2ed48f1161a..6f979368b61cd 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -21,8 +21,8 @@ ul = uls[i] p ul.text p ul.text.match(/^(1)居住地(.+)$/m) - p ul.text.match(/^(2)年齢(.+)$/m) - p ul.text.match(/^(3)性別(\w+)$/m) + p ul.text.match(/(2)年齢(.+)\\n/m) + p ul.text.match(/^(3)性別(.+)$/m) end exit From b37c8ff79fb76ab5fed6d2e26c7d10dc791d6958 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:52:19 +0900 Subject: [PATCH 13/40] Update regex --- scraping_data.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 6f979368b61cd..01b0696f52b92 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -19,8 +19,8 @@ for i in 0..count do puts "---" ul = uls[i] - p ul.text - p ul.text.match(/^(1)居住地(.+)$/m) + puts ul.text + p ul.text.match(/^(1)居住地(.+)\n/m) p ul.text.match(/(2)年齢(.+)\\n/m) p ul.text.match(/^(3)性別(.+)$/m) end From e4e1644a35b4507067ced26caddf2d8b9e12e634 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 21:55:53 +0900 Subject: [PATCH 14/40] Update regex --- scraping_data.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraping_data.rb b/scraping_data.rb index 01b0696f52b92..46981a06fa3b3 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -21,7 +21,7 @@ ul = uls[i] puts ul.text p ul.text.match(/^(1)居住地(.+)\n/m) - p ul.text.match(/(2)年齢(.+)\\n/m) + p ul.text.match(/(2)年齢(.+)/) p ul.text.match(/^(3)性別(.+)$/m) end From bfd5aa2397a89c59473c369907a0513fd4813887 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:03:18 +0900 Subject: [PATCH 15/40] Update regex --- scraping_data.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 46981a06fa3b3..34f0408a5b635 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -20,9 +20,18 @@ puts "---" ul = uls[i] puts ul.text - p ul.text.match(/^(1)居住地(.+)\n/m) - p ul.text.match(/(2)年齢(.+)/) - p ul.text.match(/^(3)性別(.+)$/m) + address = ul.text.match(/(1)居住地(.+)/) + if address { + puts address[1] + } + age = ul.text.match(/(2)年齢(.+)/) + if age { + puts age[1] + } + gender = ul.text.match(/(3)性別(.+)/) + if gender { + puts gender[1] + } end exit From aac9c4ef7eb57ab2b38b1286137fd7e5baffa7e3 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:08:57 +0900 Subject: [PATCH 16/40] Update regex --- scraping_data.rb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 34f0408a5b635..39ca9821f9e9c 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -20,18 +20,27 @@ puts "---" ul = uls[i] puts ul.text + address = ul.text.match(/(1)居住地(.+)/) - if address { + if address puts address[1] - } + else + next + end + age = ul.text.match(/(2)年齢(.+)/) - if age { + if age puts age[1] - } + else + next + end + gender = ul.text.match(/(3)性別(.+)/) - if gender { + if gender puts gender[1] - } + else + next + end end exit From 5abb3525445c0703d7c1c73a53fbd8dd402fb1a1 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:25:46 +0900 Subject: [PATCH 17/40] Push datas --- scraping_data.rb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 39ca9821f9e9c..18dbd11e5d8c6 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -1,5 +1,6 @@ require 'selenium-webdriver' +today = Date.today.strftime("%Y/%m/%d") driver = Selenium::WebDriver.for :remote, desired_capabilities: :chrome, url: "http://#{ENV['SELENIUM_HOST']}:4444/wd/hub" # スクレイピング @@ -16,32 +17,37 @@ # noicon uls = driver.find_elements(:class => "noicon") count = uls.length - 1 +datas = [] for i in 0..count do puts "---" + data = { "リリース日" => today, "退院" => "入院中", "date" => today } ul = uls[i] - puts ul.text + # puts ul.text address = ul.text.match(/(1)居住地(.+)/) if address - puts address[1] + date["居住地"] = address[1] else next end - age = ul.text.match(/(2)年齢(.+)/) + age = ul.text.match(/年齢(.+)/) if age - puts age[1] + date["年代"] = age[1] else next end gender = ul.text.match(/(3)性別(.+)/) if gender - puts gender[1] + date["性別"] = gender[1] else next end -end + p date + datas.push(data) +end +p datas exit From 3ce461bc7d555b3f667de29a4380b09de155679a Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:27:28 +0900 Subject: [PATCH 18/40] require 'date' --- scraping_data.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/scraping_data.rb b/scraping_data.rb index 18dbd11e5d8c6..20de1801af601 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -1,4 +1,5 @@ require 'selenium-webdriver' +require 'date' today = Date.today.strftime("%Y/%m/%d") driver = Selenium::WebDriver.for :remote, desired_capabilities: :chrome, url: "http://#{ENV['SELENIUM_HOST']}:4444/wd/hub" From 2149f5ef2a87ec8bec99ed283ee871d43531769a Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:30:16 +0900 Subject: [PATCH 19/40] Fix typo --- scraping_data.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index 20de1801af601..ee750f3a1d526 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -1,5 +1,5 @@ require 'selenium-webdriver' -require 'date' +# require 'date' today = Date.today.strftime("%Y/%m/%d") driver = Selenium::WebDriver.for :remote, desired_capabilities: :chrome, url: "http://#{ENV['SELENIUM_HOST']}:4444/wd/hub" @@ -27,28 +27,30 @@ address = ul.text.match(/(1)居住地(.+)/) if address - date["居住地"] = address[1] + data["居住地"] = address[1] else next end age = ul.text.match(/年齢(.+)/) if age - date["年代"] = age[1] + data["年代"] = age[1] else next end gender = ul.text.match(/(3)性別(.+)/) if gender - date["性別"] = gender[1] + data["性別"] = gender[1] else next end - p date + p data datas.push(data) end p datas +# datas の数を数える + exit From df098bbc5082e7db9ec01908c69b21ac9711b17b Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:35:17 +0900 Subject: [PATCH 20/40] Open json file --- scraping_data.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index ee750f3a1d526..4a3e1fd2cb070 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -50,7 +50,11 @@ datas.push(data) end p datas -# datas の数を数える +data_count = datas.length -exit +File.open("data/data.json") do |file| + data_hash = JSON.load(file) + p data_hash +end +exit \ No newline at end of file From 5875b3c1347242190ecb7e9253ca4de2bc2f4ee1 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:53:35 +0900 Subject: [PATCH 21/40] =?UTF-8?q?data.json=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scraping_data.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scraping_data.rb b/scraping_data.rb index 4a3e1fd2cb070..1126abbdd447a 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -4,7 +4,7 @@ today = Date.today.strftime("%Y/%m/%d") driver = Selenium::WebDriver.for :remote, desired_capabilities: :chrome, url: "http://#{ENV['SELENIUM_HOST']}:4444/wd/hub" -# スクレイピング +# 最新ニュースのURL取得 driver.navigate.to(ENV['URL']) list_table = driver.find_element(:class => "list_table") urls = list_table.find_elements(:tag_name => "a") @@ -14,6 +14,7 @@ puts "news url = " puts url +# 最新ニュースをスクレイピング driver.navigate.to("https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html") # noicon uls = driver.find_elements(:class => "noicon") @@ -57,4 +58,16 @@ p data_hash end +# data.json を更新 +data_hash["lastUpdate"] = today +data_hash["patients"]["date"] = today +data_hash["patients"]["data"].push(datas) +data_hash["main_summary"]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["value"] + data_count +data_hash["main_summary"]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["value"] + data_count +data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] + data_count +data = +data_hash["contacts"]["data"].push({ "日付" => today, "小計" => data_count }) + +p JSON.pretty_generate(data_hash) + exit \ No newline at end of file From 26457e75b3a07cf66012949acd4676a8ac8b67d1 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 22:55:53 +0900 Subject: [PATCH 22/40] Define data_hash --- scraping_data.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/scraping_data.rb b/scraping_data.rb index 1126abbdd447a..e1e6fc1fe9247 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -53,6 +53,7 @@ p datas data_count = datas.length +data_hash = {} File.open("data/data.json") do |file| data_hash = JSON.load(file) p data_hash From 5088a7a6950567b2cf67fa5698b137896b90e72e Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 23:02:29 +0900 Subject: [PATCH 23/40] Write files --- scraping_data.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scraping_data.rb b/scraping_data.rb index e1e6fc1fe9247..084eb5109fd36 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -26,7 +26,7 @@ ul = uls[i] # puts ul.text - address = ul.text.match(/(1)居住地(.+)/) + address = ul.text.match(/居住地(.+)/) if address data["居住地"] = address[1] else @@ -40,7 +40,7 @@ next end - gender = ul.text.match(/(3)性別(.+)/) + gender = ul.text.match(/性別(.+)/) if gender data["性別"] = gender[1] else @@ -66,9 +66,12 @@ data_hash["main_summary"]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["value"] + data_count data_hash["main_summary"]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["value"] + data_count data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] + data_count -data = +# data = data_hash["contacts"]["data"].push({ "日付" => today, "小計" => data_count }) -p JSON.pretty_generate(data_hash) +data_json = JSON.pretty_generate(data_hash) +File.open("data/data.json", mode = "w") { |f| + f.write(data_json) +} exit \ No newline at end of file From dd25ab4cdee7b0ea2c7633fcfd296569dd8f6887 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 23:13:23 +0900 Subject: [PATCH 24/40] Change hash key --- .github/workflows/news_scraping.yml | 2 +- scraping_data.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index e6ec629773934..66706eb4a49de 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -35,7 +35,7 @@ jobs: commit-message: 'Update news.json' branch: news base: master - labels: auto_merge + # labels: auto_merge branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' diff --git a/scraping_data.rb b/scraping_data.rb index 084eb5109fd36..c5fe4b9924871 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -67,7 +67,7 @@ data_hash["main_summary"]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["value"] + data_count data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] + data_count # data = -data_hash["contacts"]["data"].push({ "日付" => today, "小計" => data_count }) +data_hash["patients_summary"]["data"].push({ "日付" => today, "小計" => data_count }) data_json = JSON.pretty_generate(data_hash) File.open("data/data.json", mode = "w") { |f| From 85acfc5163e4f1473e899908173f2f024fa2db03 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 23:20:02 +0900 Subject: [PATCH 25/40] Use concat instead of push --- .github/workflows/news_scraping.yml | 10 +++++----- scraping_data.rb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 66706eb4a49de..cc882fe39efe5 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -29,6 +29,11 @@ jobs: bundle update --bundler bundle install ruby scraping_data.rb + - name: Get Diff Action + uses: technote-space/get-diff-action@v1.2.2 + - name: Test + run: echo `diff ari` + if: steps.git_diff.outputs.diff - name: Create Pull Request uses: peter-evans/create-pull-request@v2 with: @@ -39,11 +44,6 @@ jobs: branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' - - name: Get Diff Action - uses: technote-space/get-diff-action@v1.2.2 - - name: Test - run: echo `diff ari` - if: steps.git_diff.outputs.diff - name: Test lines run: echo ${{ steps.git_diff.outputs.lines }} - name: Test counr diff --git a/scraping_data.rb b/scraping_data.rb index c5fe4b9924871..c5d6e597cdd23 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -62,7 +62,7 @@ # data.json を更新 data_hash["lastUpdate"] = today data_hash["patients"]["date"] = today -data_hash["patients"]["data"].push(datas) +data_hash["patients"]["data"].concat(datas) data_hash["main_summary"]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["value"] + data_count data_hash["main_summary"]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["value"] + data_count data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] + data_count From 2b411c715ca7321d696059864899a6f7530d6313 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 23:42:10 +0900 Subject: [PATCH 26/40] =?UTF-8?q?=E3=82=BD=E3=83=BC=E3=82=B9=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=92=E6=95=B4=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/news_scraping.yml | 39 +++++++++++++++++------------ scraping_data.rb | 14 ++--------- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index cc882fe39efe5..e63610aa91d81 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-ruby@v1 with: ruby-version: '2.5' - - name: execute + - name: Scraping News env: URL: "https://www.pref.miyazaki.lg.jp/kenko/hoken/kansensho/covid19/hassei.html" SELENIUM_HOST: localhost @@ -28,27 +28,34 @@ jobs: gem install bundler bundle update --bundler bundle install - ruby scraping_data.rb - - name: Get Diff Action - uses: technote-space/get-diff-action@v1.2.2 - - name: Test - run: echo `diff ari` - if: steps.git_diff.outputs.diff + ruby scraping.rb - name: Create Pull Request uses: peter-evans/create-pull-request@v2 with: commit-message: 'Update news.json' branch: news base: master - # labels: auto_merge + labels: auto_merge branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' - - name: Test lines - run: echo ${{ steps.git_diff.outputs.lines }} - - name: Test counr - run: echo ${{ steps.git_diff.outputs.count }} - - name: Test diff - run: echo ${{ steps.git_diff.outputs.diff }} - - name: Test insertions - run: echo ${{ steps.git_diff.outputs.insertions }} + - name: Get Diff Action + uses: technote-space/get-diff-action@v1.2.2 + - name: Scraping Data + env: + URL: "https://www.pref.miyazaki.lg.jp/kenko/hoken/kansensho/covid19/hassei.html" + SELENIUM_HOST: localhost + TZ: Asia/Tokyo + run: | + ruby scraping_data.rb + if: steps.git_diff.outputs.diff + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 + with: + commit-message: 'Update data.json' + branch: data + base: master + # labels: auto_merge + branch-suffix: timestamp + title: '陽性患者数更新' + body: '公式サイトの陽性患者数が更新されました。差分を確認してマージしてください。' diff --git a/scraping_data.rb b/scraping_data.rb index c5d6e597cdd23..e07bc08286823 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -8,23 +8,16 @@ driver.navigate.to(ENV['URL']) list_table = driver.find_element(:class => "list_table") urls = list_table.find_elements(:tag_name => "a") -# texts = list_table.find_elements(:tag_name => "a") -# count = urls.length - 1 url = urls[0].attribute("href") -puts "news url = " -puts url # 最新ニュースをスクレイピング -driver.navigate.to("https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html") -# noicon +driver.navigate.to(url) uls = driver.find_elements(:class => "noicon") count = uls.length - 1 datas = [] for i in 0..count do - puts "---" data = { "リリース日" => today, "退院" => "入院中", "date" => today } ul = uls[i] - # puts ul.text address = ul.text.match(/居住地(.+)/) if address @@ -47,16 +40,14 @@ next end - p data datas.push(data) end -p datas + data_count = datas.length data_hash = {} File.open("data/data.json") do |file| data_hash = JSON.load(file) - p data_hash end # data.json を更新 @@ -66,7 +57,6 @@ data_hash["main_summary"]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["value"] + data_count data_hash["main_summary"]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["value"] + data_count data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] + data_count -# data = data_hash["patients_summary"]["data"].push({ "日付" => today, "小計" => data_count }) data_json = JSON.pretty_generate(data_hash) From 07a8adf0e909f1d5ed9055539a85193c354746a0 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 23:44:57 +0900 Subject: [PATCH 27/40] Update cron schedule --- .github/workflows/news_scraping.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index e63610aa91d81..9649d711ada4a 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -1,7 +1,7 @@ name: scraping news -on: push - # schedule: - # - cron: '0 */6 * * *' +on: + schedule: + - cron: '0 */6 * * *' jobs: scraping: runs-on: ubuntu-latest From d08d7299187f86a7794874e542f35e2215d89ac1 Mon Sep 17 00:00:00 2001 From: koogawa Date: Sun, 12 Apr 2020 23:52:21 +0900 Subject: [PATCH 28/40] =?UTF-8?q?json=20=E3=82=92=E3=83=AC=E3=83=93?= =?UTF-8?q?=E3=83=A5=E3=83=BC=E3=81=97=E3=82=84=E3=81=99=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E6=95=B4=E5=BD=A2=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/news_scraping.yml | 2 +- scraping.rb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 9d0620450a9f3..9262e6426e673 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -35,7 +35,7 @@ jobs: commit-message: 'Update news.json' branch: news base: master - labels: auto_merge + # labels: auto_merge branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' diff --git a/scraping.rb b/scraping.rb index 2a0883dd53309..80cf6623273b0 100644 --- a/scraping.rb +++ b/scraping.rb @@ -18,9 +18,10 @@ puts news # JSON出力 -File.open("data/news.json", 'w') do |file| - str = JSON.dump(news, file) -end +news_json = JSON.pretty_generate(news) +File.open("data/news.json", mode = "w") { |f| + f.write(news_json) +} exit From 468c2fc692acc39808b321fcd5c33e678a97da24 Mon Sep 17 00:00:00 2001 From: koogawa Date: Mon, 13 Apr 2020 00:15:36 +0900 Subject: [PATCH 29/40] Check outputs --- .github/workflows/news_scraping.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index dbb6b935f889b..61e376d66ce53 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -30,6 +30,7 @@ jobs: bundle install ruby scraping.rb - name: Create Pull Request + id: cpr uses: peter-evans/create-pull-request@v2 with: commit-message: 'Update news.json' @@ -39,6 +40,9 @@ jobs: branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}" - name: Get Diff Action uses: technote-space/get-diff-action@v1.2.2 - name: Scraping Data @@ -59,3 +63,4 @@ jobs: branch-suffix: timestamp title: '陽性患者数更新' body: '公式サイトの陽性患者数が更新されました。差分を確認してマージしてください。' + if: steps.git_diff.outputs.diff From d857405bd2f255ebe8717123d01bb12a6b740655 Mon Sep 17 00:00:00 2001 From: koogawa Date: Mon, 13 Apr 2020 01:21:31 +0900 Subject: [PATCH 30/40] =?UTF-8?q?=E3=81=8A=E7=9F=A5=E3=82=89=E3=81=9B?= =?UTF-8?q?=E3=81=AB=E5=B7=AE=E5=88=86=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=8B=E3=81=A9=E3=81=86=E3=81=8B=E5=88=A4=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B=E6=96=B9=E6=B3=95=E3=82=92=E5=A4=89=E3=81=88=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/news_scraping.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 61e376d66ce53..79f89a2573f80 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -1,7 +1,7 @@ name: scraping news -on: - schedule: - - cron: '0 */6 * * *' +on: push + # schedule: + # - cron: '0 */6 * * *' jobs: scraping: runs-on: ubuntu-latest @@ -14,8 +14,6 @@ jobs: - /dev/shm:/dev/shm steps: - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-ruby@v1 with: ruby-version: '2.5' @@ -40,11 +38,9 @@ jobs: branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' - - name: Check outputs - run: | - echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}" - - name: Get Diff Action - uses: technote-space/get-diff-action@v1.2.2 + # ここから下はお知らせに差分があった場合のみ実行する + - uses: actions/checkout@v2 + if: steps.cpr.outputs.pr_number != 0 - name: Scraping Data env: URL: "https://www.pref.miyazaki.lg.jp/kenko/hoken/kansensho/covid19/hassei.html" @@ -52,7 +48,7 @@ jobs: TZ: Asia/Tokyo run: | ruby scraping_data.rb - if: steps.git_diff.outputs.diff + if: steps.cpr.outputs.pr_number != 0 - name: Create Pull Request uses: peter-evans/create-pull-request@v2 with: @@ -62,5 +58,5 @@ jobs: # labels: auto_merge branch-suffix: timestamp title: '陽性患者数更新' - body: '公式サイトの陽性患者数が更新されました。差分を確認してマージしてください。' - if: steps.git_diff.outputs.diff + body: '公式サイトの情報が更新されました。差分を確認してマージしてください。' + if: steps.cpr.outputs.pr_number != 0 From 814dba7bcde593cd354643906dd111f14e1935c4 Mon Sep 17 00:00:00 2001 From: koogawa Date: Mon, 13 Apr 2020 01:57:14 +0900 Subject: [PATCH 31/40] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3?= =?UTF-8?q?=E3=83=88=E6=95=B0=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scraping.rb | 2 +- scraping_data.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scraping.rb b/scraping.rb index 80cf6623273b0..6ad09d7ca996b 100644 --- a/scraping.rb +++ b/scraping.rb @@ -18,7 +18,7 @@ puts news # JSON出力 -news_json = JSON.pretty_generate(news) +news_json = JSON.pretty_generate(news, {:indent => " "}) File.open("data/news.json", mode = "w") { |f| f.write(news_json) } diff --git a/scraping_data.rb b/scraping_data.rb index e07bc08286823..d512b26d3d7b4 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -59,7 +59,7 @@ data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] = data_hash["main_summary"]["children"][0]["children"][0]["children"][0]["value"] + data_count data_hash["patients_summary"]["data"].push({ "日付" => today, "小計" => data_count }) -data_json = JSON.pretty_generate(data_hash) +data_json = JSON.pretty_generate(data_hash, {:indent => " "}) File.open("data/data.json", mode = "w") { |f| f.write(data_json) } From f9d89515875ba67a781e062a20aef6b5048fb156 Mon Sep 17 00:00:00 2001 From: koogawa Date: Mon, 13 Apr 2020 08:20:21 +0900 Subject: [PATCH 32/40] Change cron schedule --- .github/workflows/news_scraping.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 79f89a2573f80..bf0a9d3e45cf0 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -1,7 +1,7 @@ name: scraping news -on: push - # schedule: - # - cron: '0 */6 * * *' +on: + schedule: + - cron: '0 */3 * * *' jobs: scraping: runs-on: ubuntu-latest From 1156484519e6e5eb49c125929ca95bcad4ae28f3 Mon Sep 17 00:00:00 2001 From: koogawa Date: Mon, 13 Apr 2020 09:08:04 +0900 Subject: [PATCH 33/40] Update cron schedule --- .github/workflows/news_scraping.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index bf0a9d3e45cf0..0526821b76d37 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -1,7 +1,7 @@ name: scraping news on: schedule: - - cron: '0 */3 * * *' + - cron: '0 * * * *' jobs: scraping: runs-on: ubuntu-latest From 3c7d78c74819b0811c23c06a5fbb344b2ec502a4 Mon Sep 17 00:00:00 2001 From: koogawa Date: Mon, 13 Apr 2020 10:43:00 +0900 Subject: [PATCH 34/40] Update cron schedule --- .github/workflows/news_scraping.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 0526821b76d37..3dae77917fab8 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -1,7 +1,7 @@ name: scraping news on: schedule: - - cron: '0 * * * *' + - cron: '0 */6 * * *' jobs: scraping: runs-on: ubuntu-latest From c0675d5b6dfb5ce9f7b2e72cead5ed18214febf3 Mon Sep 17 00:00:00 2001 From: koogawa Date: Tue, 14 Apr 2020 08:25:43 +0900 Subject: [PATCH 35/40] =?UTF-8?q?=E5=90=84=E7=A8=AE=20json=20=E3=82=92?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E3=81=AE=E7=8A=B6=E6=85=8B=E3=81=AB=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/data.json | 523 ++++++++++++++++++++++++------------------------- data/news.json | 87 ++++---- 2 files changed, 311 insertions(+), 299 deletions(-) diff --git a/data/data.json b/data/data.json index 44169118c9db9..3ed6b3fea24f7 100755 --- a/data/data.json +++ b/data/data.json @@ -1,266 +1,263 @@ { - "lastUpdate": "2020/04/07", - "patients": { - "date": "2020/04/07", - "data": [ - { - "リリース日": "2020-03-04T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "70代", - "性別": "男性", - "退院": "退院", - "date": "2020-04-07" - }, - { - "リリース日": "2020-03-17T08:00:00.000Z", - "居住地": "イギリス", - "年代": "20代", - "性別": "男性", - "退院": "退院", - "date": "2020-03-27" - }, - { - "リリース日": "2020-03-17T08:00:00.000Z", - "居住地": "高千穂町", - "年代": "40代", - "性別": "男性", - "退院": "退院", - "date": "2020-03-27" - }, - { - "リリース日": "2020-04-03T08:00:00.000Z", - "居住地": "延岡市", - "年代": "50代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-03" - }, - { - "リリース日": "2020-04-05T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "40代", - "性別": "女性", - "退院": "入院中", - "date": "2020-04-03" - }, - { - "リリース日": "2020-04-05T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "10代", - "性別": "女性", - "退院": "入院中", - "date": "2020-04-03" - }, - { - "リリース日": "2020-04-05T08:00:00.000Z", - "居住地": "東京都", - "年代": "50代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-03" - }, - { - "リリース日": "2020-04-05T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "50代", - "性別": "女性", - "退院": "入院中", - "date": "2020-04-04" - }, - { - "リリース日": "2020-04-05T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "50代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-05" - }, - { - "リリース日": "2020-04-05T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "60代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-05" - }, - { - "リリース日": "2020-04-06T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "40代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-06" - }, - { - "リリース日": "2020-04-07T08:00:00.000Z", - "居住地": "日南市", - "年代": "50代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-07" - }, - { - "リリース日": "2020-04-08T08:00:00.000Z", - "居住地": "日南市", - "年代": "30代", - "性別": "女性", - "退院": "入院中", - "date": "2020-04-08" - }, - { - "リリース日": "2020-04-08T08:00:00.000Z", - "居住地": "日南市", - "年代": "10代", - "性別": "女性", - "退院": "入院中", - "date": "2020-04-08" - }, - { - "リリース日": "2020-04-08T08:00:00.000Z", - "居住地": "日南市", - "年代": "10代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-08" - }, - { - "リリース日": "2020-04-08T08:00:00.000Z", - "居住地": "日南市", - "年代": "10代", - "性別": "男性", - "退院": "入院中", - "date": "2020-04-08" - }, - { - "リリース日": "2020-04-11T08:00:00.000Z", - "居住地": "宮崎市", - "年代": "50代", - "性別": "女性", - "退院": "入院中", - "date": "2020-04-11" - } - ] - }, - "main_summary": { - "attr": "検査実施人数", - "value": 338, - "children": [ - { - "attr": "陽性患者数", - "value": 17, - "children": [ - { - "attr": "入院中", - "value": 14, - "children": [ - { - "attr": "軽症・中等症", - "value": 14 - }, - { - "attr": "重症", - "value": 0 - } - ] - }, - { - "attr": "退院", - "value": 3 - }, - { - "attr": "死亡", - "value": 0 - } - ] - } - ] - }, - "contacts": { - "date": "2020\/04\/03 23:40", - "data": [ - { - "日付": "2020-03-12T08:00:00.000Z", - "曜日": "木", - "9-13時": 10, - "13-17時": 0, - "17-21時": 0, - "date": "2020-03-12", - "w": 4, - "short_date": "03\/12", - "小計": 0 - } - ] - }, - "querents": { - "date": "2020\/04\/03 23:40", - "data": [ - { - "日付": "2020-03-12T08:00:00.000Z", - "曜日": "木", - "9-17時": 0, - "17-翌9時": 0, - "date": "2020-03-12", - "w": 4, - "short_date": "03\/12", - "小計": 0 - } - ] - }, - "patients_summary": { - "date": "2020\/04\/03 23:40", - "data": [ - { - "日付": "2020-03-03T08:00:00.000Z", - "小計": 0 - }, - { - "日付": "2020-03-04T08:00:00.000Z", - "小計": 1 - }, - { - "日付": "2020-03-17T08:00:00.000Z", - "小計": 2 - }, - { - "日付": "2020-04-03T08:00:00.000Z", - "小計": 4 - }, - { - "日付": "2020-04-04T08:00:00.000Z", - "小計": 1 - }, - { - "日付": "2020-04-05T08:00:00.000Z", - "小計": 2 - }, - { - "日付": "2020-04-06T08:00:00.000Z", - "小計": 1 - }, - { - "日付": "2020-04-07T08:00:00.000Z", - "小計": 1 - }, - { - "日付": "2020-04-08T08:00:00.000Z", - "小計": 4 - }, - { - "日付": "2020-04-11T08:00:00.000Z", - "小計": 1 - } - ] - }, - "discharges_summary": { - "date": "2020\/03\/27 00:00", - "data": [ - ] - }, - "inspections_summary": { - "date": "2020\/03\/27 00:00", - "data": { + "lastUpdate": "2020/04/13", + "patients": { + "date": "2020/04/13", + "data": [ + { + "リリース日": "2020-03-04T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "70代", + "性別": "男性", + "退院": "退院", + "date": "2020-04-07" }, - "labels": [ - ] - } + { + "リリース日": "2020-03-17T08:00:00.000Z", + "居住地": "イギリス", + "年代": "20代", + "性別": "男性", + "退院": "退院", + "date": "2020-03-27" + }, + { + "リリース日": "2020-03-17T08:00:00.000Z", + "居住地": "高千穂町", + "年代": "40代", + "性別": "男性", + "退院": "退院", + "date": "2020-03-27" + }, + { + "リリース日": "2020-04-03T08:00:00.000Z", + "居住地": "延岡市", + "年代": "50代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-03" + }, + { + "リリース日": "2020-04-05T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "40代", + "性別": "女性", + "退院": "入院中", + "date": "2020-04-03" + }, + { + "リリース日": "2020-04-05T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "10代", + "性別": "女性", + "退院": "入院中", + "date": "2020-04-03" + }, + { + "リリース日": "2020-04-05T08:00:00.000Z", + "居住地": "東京都", + "年代": "50代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-03" + }, + { + "リリース日": "2020-04-05T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "50代", + "性別": "女性", + "退院": "入院中", + "date": "2020-04-04" + }, + { + "リリース日": "2020-04-05T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "50代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-05" + }, + { + "リリース日": "2020-04-05T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "60代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-05" + }, + { + "リリース日": "2020-04-06T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "40代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-06" + }, + { + "リリース日": "2020-04-07T08:00:00.000Z", + "居住地": "日南市", + "年代": "50代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-07" + }, + { + "リリース日": "2020-04-08T08:00:00.000Z", + "居住地": "日南市", + "年代": "30代", + "性別": "女性", + "退院": "入院中", + "date": "2020-04-08" + }, + { + "リリース日": "2020-04-08T08:00:00.000Z", + "居住地": "日南市", + "年代": "10代", + "性別": "女性", + "退院": "入院中", + "date": "2020-04-08" + }, + { + "リリース日": "2020-04-08T08:00:00.000Z", + "居住地": "日南市", + "年代": "10代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-08" + }, + { + "リリース日": "2020-04-08T08:00:00.000Z", + "居住地": "日南市", + "年代": "10代", + "性別": "男性", + "退院": "入院中", + "date": "2020-04-08" + }, + { + "リリース日": "2020-04-11T08:00:00.000Z", + "居住地": "宮崎市", + "年代": "50代", + "性別": "女性", + "退院": "入院中", + "date": "2020-04-11" + } + ] + }, + "main_summary": { + "attr": "検査実施人数", + "value": 703, + "children": [ + { + "attr": "陽性患者数", + "value": 17, + "children": [ + { + "attr": "入院中", + "value": 14, + "children": [ + { + "attr": "軽症・中等症", + "value": 14 + }, + { + "attr": "重症", + "value": 0 + } + ] + }, + { + "attr": "退院", + "value": 3 + }, + { + "attr": "死亡", + "value": 0 + } + ] + } + ] + }, + "contacts": { + "date": "2020/04/03 23:40", + "data": [ + { + "日付": "2020-03-12T08:00:00.000Z", + "曜日": "木", + "9-13時": 10, + "13-17時": 0, + "17-21時": 0, + "date": "2020-03-12", + "w": 4, + "short_date": "03/12", + "小計": 0 + } + ] + }, + "querents": { + "date": "2020/04/03 23:40", + "data": [ + { + "日付": "2020-03-12T08:00:00.000Z", + "曜日": "木", + "9-17時": 0, + "17-翌9時": 0, + "date": "2020-03-12", + "w": 4, + "short_date": "03/12", + "小計": 0 + } + ] + }, + "patients_summary": { + "date": "2020/04/03 23:40", + "data": [ + { + "日付": "2020-03-03T08:00:00.000Z", + "小計": 0 + }, + { + "日付": "2020-03-04T08:00:00.000Z", + "小計": 1 + }, + { + "日付": "2020-03-17T08:00:00.000Z", + "小計": 2 + }, + { + "日付": "2020-04-03T08:00:00.000Z", + "小計": 4 + }, + { + "日付": "2020-04-04T08:00:00.000Z", + "小計": 1 + }, + { + "日付": "2020-04-05T08:00:00.000Z", + "小計": 2 + }, + { + "日付": "2020-04-06T08:00:00.000Z", + "小計": 1 + }, + { + "日付": "2020-04-07T08:00:00.000Z", + "小計": 1 + }, + { + "日付": "2020-04-08T08:00:00.000Z", + "小計": 4 + }, + { + "日付": "2020-04-11T08:00:00.000Z", + "小計": 1 + } + ] + }, + "discharges_summary": { + "date": "2020/03/27 00:00", + "data": [] + }, + "inspections_summary": { + "date": "2020/03/27 00:00", + "data": {}, + "labels": [] } +} \ No newline at end of file diff --git a/data/news.json b/data/news.json index 0ca28ba0b628e..09cc677053ddd 100755 --- a/data/news.json +++ b/data/news.json @@ -1,39 +1,54 @@ { "newsItems": [ - { - "date": "2020\/04\/07", - "url": "https:\/\/www.pref.miyazaki.lg.jp\/kohosenryaku\/kenko\/hoken\/20200407.html", - "text": "新型コロナウイルス感染症患者(第12例目)の発生について(第一報)" - }, - { - "date": "2020\/04\/07", - "url": "https:\/\/www.pref.miyazaki.lg.jp\/kohosenryaku\/kenko\/hoken\/covid19_20200304.html", - "text": "新型コロナウイルス感染症患者(第1例目)の発生について(続報)" - }, - { - "date": "2020\/04\/06", - "url": "https:\/\/www.pref.miyazaki.lg.jp\/kohosenryaku\/kenko\/hoken\/covid19_20200406.html", - "text": "新型コロナウイルス感染症患者(第11例目)の発生について(第一報)" - }, - { - "date": "2020\/04\/05", - "url": "https:\/\/www.pref.miyazaki.lg.jp\/kohosenryaku\/kenko\/hoken\/covid19_20200405.html", - "text": "新型コロナウイルス感染症患者(第9、10例目)の発生について(第一報)" - }, - { - "date": "2020\/04\/04", - "url": "https:\/\/www.pref.miyazaki.lg.jp\/kohosenryaku\/kenko\/hoken\/covid19_20200404.html", - "text": "新型コロナウイルス感染症患者(8例目)の発生について(第一報)" - }, - { - "date": "2020\/04\/04", - "url": "https:\/\/www.pref.miyazaki.lg.jp\/kohosenryaku\/kenko\/hoken\/covid19_20200403.html", - "text": "新型コロナウイルス感染症患者(4例目)の発生について(続報)" - }, - { - "date": "2020\/04\/03", - "url": "https:\/\/www.pref.miyazaki.lg.jp\/kohosenryaku\/kenko\/hoken\/covid19_20200403-2.html", - "text": "新型コロナウイルス感染症患者(5~7例目)の発生について(第一報)" - } + { + "date": "2020年4月11日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200411.html", + "text": "新型コロナウイルス感染症患者(第17例目)の発生について(第一報)" + }, + { + "date": "2020年4月8日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html", + "text": "新型コロナウイルス感染症患者(第13~16例目)の発生について(第一報)" + }, + { + "date": "2020年4月7日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/20200407.html", + "text": "新型コロナウイルス感染症患者(第12例目)の発生について(第一報)" + }, + { + "date": "2020年4月7日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200304.html", + "text": "新型コロナウイルス感染症患者(第1例目)の発生について(続報)" + }, + { + "date": "2020年4月6日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200406.html", + "text": "新型コロナウイルス感染症患者(第11例目)の発生について(第一報)" + }, + { + "date": "2020年4月5日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200405.html", + "text": "新型コロナウイルス感染症患者(第9、10例目)の発生について(第一報)" + }, + { + "date": "2020年4月4日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200404.html", + "text": "新型コロナウイルス感染症患者(8例目)の発生について(第一報)" + }, + { + "date": "2020年4月4日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403.html", + "text": "新型コロナウイルス感染症患者(4例目)の発生について(続報)" + }, + { + "date": "2020年4月3日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403-2.html", + "text": "新型コロナウイルス感染症患者(5~7例目)の発生について(第一報)" + }, + { + "date": "2020年4月3日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200317.html", + "text": "新型コロナウイルス感染症患者(2例目、3例目)の発生について(続報)" + } ] -} \ No newline at end of file + } \ No newline at end of file From bb92d6150a810d2c42793f543ab46749fc1af556 Mon Sep 17 00:00:00 2001 From: koogawa Date: Wed, 22 Apr 2020 23:30:29 +0900 Subject: [PATCH 36/40] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E6=96=87?= =?UTF-8?q?=E5=AD=97=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/news_scraping.yml | 2 +- scraping_data.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index 3dae77917fab8..f680a912e456f 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -1,5 +1,5 @@ name: scraping news -on: +on: schedule: - cron: '0 */6 * * *' jobs: diff --git a/scraping_data.rb b/scraping_data.rb index d512b26d3d7b4..4a8ae3182146f 100644 --- a/scraping_data.rb +++ b/scraping_data.rb @@ -1,5 +1,5 @@ require 'selenium-webdriver' -# require 'date' +require 'date' today = Date.today.strftime("%Y/%m/%d") driver = Selenium::WebDriver.for :remote, desired_capabilities: :chrome, url: "http://#{ENV['SELENIUM_HOST']}:4444/wd/hub" From 5036a258867c99f468a85cbc1eb647f834c475cb Mon Sep 17 00:00:00 2001 From: koogawa Date: Wed, 22 Apr 2020 23:37:20 +0900 Subject: [PATCH 37/40] =?UTF-8?q?=E4=B8=80=E6=99=82=E7=9A=84=E3=81=AB?= =?UTF-8?q?=E5=A4=96=E3=81=97=E3=81=9F=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=82=A2=E3=82=A6=E3=83=88=E3=82=92=E3=82=82=E3=81=A8=E3=81=AB?= =?UTF-8?q?=E6=88=BB=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/news_scraping.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/news_scraping.yml b/.github/workflows/news_scraping.yml index f680a912e456f..d92943f0dcb98 100644 --- a/.github/workflows/news_scraping.yml +++ b/.github/workflows/news_scraping.yml @@ -34,7 +34,7 @@ jobs: commit-message: 'Update news.json' branch: news base: master - # labels: auto_merge + labels: auto_merge branch-suffix: timestamp title: '最新のお知らせ更新' body: '公式サイトのお知らせが更新されました。差分を確認してマージしてください。' From 94c0597ad4f34660c1e8c0353e0f765ad6efbf58 Mon Sep 17 00:00:00 2001 From: koogawa Date: Tue, 28 Apr 2020 22:27:26 +0900 Subject: [PATCH 38/40] =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/data.json | 36 ++++++++++++++++----------------- data/news.json | 55 +------------------------------------------------- 2 files changed, 19 insertions(+), 72 deletions(-) diff --git a/data/data.json b/data/data.json index 3ed6b3fea24f7..138fd6dd63f51 100755 --- a/data/data.json +++ b/data/data.json @@ -1,7 +1,7 @@ { - "lastUpdate": "2020/04/13", + "lastUpdate": "2020/04/26", "patients": { - "date": "2020/04/13", + "date": "2020/04/26", "data": [ { "リリース日": "2020-03-04T08:00:00.000Z", @@ -32,7 +32,7 @@ "居住地": "延岡市", "年代": "50代", "性別": "男性", - "退院": "入院中", + "退院": "退院", "date": "2020-04-03" }, { @@ -40,16 +40,16 @@ "居住地": "宮崎市", "年代": "40代", "性別": "女性", - "退院": "入院中", - "date": "2020-04-03" + "退院": "退院", + "date": "2020-04-22" }, { "リリース日": "2020-04-05T08:00:00.000Z", "居住地": "宮崎市", "年代": "10代", "性別": "女性", - "退院": "入院中", - "date": "2020-04-03" + "退院": "退院", + "date": "2020-04-26" }, { "リリース日": "2020-04-05T08:00:00.000Z", @@ -64,24 +64,24 @@ "居住地": "宮崎市", "年代": "50代", "性別": "女性", - "退院": "入院中", - "date": "2020-04-04" + "退院": "退院", + "date": "2020-04-26" }, { "リリース日": "2020-04-05T08:00:00.000Z", "居住地": "宮崎市", "年代": "50代", "性別": "男性", - "退院": "入院中", - "date": "2020-04-05" + "退院": "退院", + "date": "2020-04-22" }, { "リリース日": "2020-04-05T08:00:00.000Z", "居住地": "宮崎市", "年代": "60代", "性別": "男性", - "退院": "入院中", - "date": "2020-04-05" + "退院": "退院", + "date": "2020-04-23" }, { "リリース日": "2020-04-06T08:00:00.000Z", @@ -143,7 +143,7 @@ }, "main_summary": { "attr": "検査実施人数", - "value": 703, + "value": 925, "children": [ { "attr": "陽性患者数", @@ -151,11 +151,11 @@ "children": [ { "attr": "入院中", - "value": 14, + "value": 8, "children": [ { "attr": "軽症・中等症", - "value": 14 + "value": 8 }, { "attr": "重症", @@ -165,7 +165,7 @@ }, { "attr": "退院", - "value": 3 + "value": 9 }, { "attr": "死亡", @@ -207,7 +207,7 @@ ] }, "patients_summary": { - "date": "2020/04/03 23:40", + "date": "2020/04/12 22:00", "data": [ { "日付": "2020-03-03T08:00:00.000Z", diff --git a/data/news.json b/data/news.json index 09cc677053ddd..442cd55860e46 100755 --- a/data/news.json +++ b/data/news.json @@ -1,54 +1 @@ -{ - "newsItems": [ - { - "date": "2020年4月11日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200411.html", - "text": "新型コロナウイルス感染症患者(第17例目)の発生について(第一報)" - }, - { - "date": "2020年4月8日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html", - "text": "新型コロナウイルス感染症患者(第13~16例目)の発生について(第一報)" - }, - { - "date": "2020年4月7日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/20200407.html", - "text": "新型コロナウイルス感染症患者(第12例目)の発生について(第一報)" - }, - { - "date": "2020年4月7日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200304.html", - "text": "新型コロナウイルス感染症患者(第1例目)の発生について(続報)" - }, - { - "date": "2020年4月6日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200406.html", - "text": "新型コロナウイルス感染症患者(第11例目)の発生について(第一報)" - }, - { - "date": "2020年4月5日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200405.html", - "text": "新型コロナウイルス感染症患者(第9、10例目)の発生について(第一報)" - }, - { - "date": "2020年4月4日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200404.html", - "text": "新型コロナウイルス感染症患者(8例目)の発生について(第一報)" - }, - { - "date": "2020年4月4日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403.html", - "text": "新型コロナウイルス感染症患者(4例目)の発生について(続報)" - }, - { - "date": "2020年4月3日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403-2.html", - "text": "新型コロナウイルス感染症患者(5~7例目)の発生について(第一報)" - }, - { - "date": "2020年4月3日", - "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200317.html", - "text": "新型コロナウイルス感染症患者(2例目、3例目)の発生について(続報)" - } - ] - } \ No newline at end of file +{"newsItems":[{"date":"2020年4月11日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200411.html","text":"新型コロナウイルス感染症患者(第17例目)の発生について(第一報)"},{"date":"2020年4月8日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html","text":"新型コロナウイルス感染症患者(第13~16例目)の発生について(第一報)"},{"date":"2020年4月7日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/20200407.html","text":"新型コロナウイルス感染症患者(第12例目)の発生について(第一報)"},{"date":"2020年4月7日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200304.html","text":"新型コロナウイルス感染症患者(第1例目)の発生について(続報)"},{"date":"2020年4月6日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200406.html","text":"新型コロナウイルス感染症患者(第11例目)の発生について(第一報)"},{"date":"2020年4月5日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200405.html","text":"新型コロナウイルス感染症患者(第9、10例目)の発生について(第一報)"},{"date":"2020年4月4日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200404.html","text":"新型コロナウイルス感染症患者(8例目)の発生について(第一報)"},{"date":"2020年4月4日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403.html","text":"新型コロナウイルス感染症患者(4例目)の発生について(続報)"},{"date":"2020年4月3日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403-2.html","text":"新型コロナウイルス感染症患者(5~7例目)の発生について(第一報)"},{"date":"2020年4月3日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200317.html","text":"新型コロナウイルス感染症患者(2例目、3例目)の発生について(続報)"}]} \ No newline at end of file From 9bdd21eb250f976cdf6b0a8783f3971b5d3a25fa Mon Sep 17 00:00:00 2001 From: koogawa Date: Tue, 28 Apr 2020 22:29:44 +0900 Subject: [PATCH 39/40] =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/data.json b/data/data.json index 138fd6dd63f51..0b5a1e4802765 100755 --- a/data/data.json +++ b/data/data.json @@ -143,7 +143,7 @@ }, "main_summary": { "attr": "検査実施人数", - "value": 925, + "value": 993, "children": [ { "attr": "陽性患者数", From 167e494f687dcc583ac3a9060dd06d6cb096fe7b Mon Sep 17 00:00:00 2001 From: koogawa Date: Tue, 28 Apr 2020 22:37:42 +0900 Subject: [PATCH 40/40] =?UTF-8?q?news.json=20=E3=82=82=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/news.json | 55 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/data/news.json b/data/news.json index 442cd55860e46..09cc677053ddd 100755 --- a/data/news.json +++ b/data/news.json @@ -1 +1,54 @@ -{"newsItems":[{"date":"2020年4月11日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200411.html","text":"新型コロナウイルス感染症患者(第17例目)の発生について(第一報)"},{"date":"2020年4月8日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html","text":"新型コロナウイルス感染症患者(第13~16例目)の発生について(第一報)"},{"date":"2020年4月7日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/20200407.html","text":"新型コロナウイルス感染症患者(第12例目)の発生について(第一報)"},{"date":"2020年4月7日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200304.html","text":"新型コロナウイルス感染症患者(第1例目)の発生について(続報)"},{"date":"2020年4月6日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200406.html","text":"新型コロナウイルス感染症患者(第11例目)の発生について(第一報)"},{"date":"2020年4月5日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200405.html","text":"新型コロナウイルス感染症患者(第9、10例目)の発生について(第一報)"},{"date":"2020年4月4日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200404.html","text":"新型コロナウイルス感染症患者(8例目)の発生について(第一報)"},{"date":"2020年4月4日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403.html","text":"新型コロナウイルス感染症患者(4例目)の発生について(続報)"},{"date":"2020年4月3日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403-2.html","text":"新型コロナウイルス感染症患者(5~7例目)の発生について(第一報)"},{"date":"2020年4月3日","url":"https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200317.html","text":"新型コロナウイルス感染症患者(2例目、3例目)の発生について(続報)"}]} \ No newline at end of file +{ + "newsItems": [ + { + "date": "2020年4月11日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200411.html", + "text": "新型コロナウイルス感染症患者(第17例目)の発生について(第一報)" + }, + { + "date": "2020年4月8日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200408.html", + "text": "新型コロナウイルス感染症患者(第13~16例目)の発生について(第一報)" + }, + { + "date": "2020年4月7日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/20200407.html", + "text": "新型コロナウイルス感染症患者(第12例目)の発生について(第一報)" + }, + { + "date": "2020年4月7日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200304.html", + "text": "新型コロナウイルス感染症患者(第1例目)の発生について(続報)" + }, + { + "date": "2020年4月6日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200406.html", + "text": "新型コロナウイルス感染症患者(第11例目)の発生について(第一報)" + }, + { + "date": "2020年4月5日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200405.html", + "text": "新型コロナウイルス感染症患者(第9、10例目)の発生について(第一報)" + }, + { + "date": "2020年4月4日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200404.html", + "text": "新型コロナウイルス感染症患者(8例目)の発生について(第一報)" + }, + { + "date": "2020年4月4日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403.html", + "text": "新型コロナウイルス感染症患者(4例目)の発生について(続報)" + }, + { + "date": "2020年4月3日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200403-2.html", + "text": "新型コロナウイルス感染症患者(5~7例目)の発生について(第一報)" + }, + { + "date": "2020年4月3日", + "url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200317.html", + "text": "新型コロナウイルス感染症患者(2例目、3例目)の発生について(続報)" + } + ] + } \ No newline at end of file