Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Release 2020-07-07 08:58:53 +0900 #274

Merged
merged 27 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
eb00bb4
Fix: 陽性患者の属性を日付が新しい順に修正
May 17, 2020
d7d2b73
Delete: デバッグ用のconsole.log()を削除
May 17, 2020
b304879
お知らせが無いときのスクレイピングが失敗するのを修正
koogawa May 29, 2020
12dde9f
debug
koogawa May 29, 2020
f427db6
displayed 使ってみる
koogawa May 29, 2020
a849b41
find_elements にする
koogawa May 29, 2020
355e6ca
不要な処理を削除
koogawa May 29, 2020
12f424d
Merge pull request #250 from covid19-miyazaki/issue/fix_news_scraping
korosuke613 May 30, 2020
2e92583
Merge branch 'master' of https://github.com/covid19-miyazaki/covid19 …
TakaShinoda May 31, 2020
ad9773b
fix: 知事からのメッセージのリンクを最新のものに変更
TakaShinoda May 31, 2020
718989a
fix: 最新のお知らせを更新
TakaShinoda May 31, 2020
2af0396
fix: '第2波第3波に備えて「新しい生活様式」の実践へ!'を最新のお知らせへ移動
TakaShinoda May 31, 2020
ad6c70d
非公式を強調
korosuke613 May 31, 2020
9a83ce9
タイトルなどに非公式の文言を追加
korosuke613 May 31, 2020
71e0326
Merge pull request #254 from covid19-miyazaki/ticket-253
korosuke613 Jun 1, 2020
185d097
Merge branch 'development' into ticket-251
korosuke613 Jun 1, 2020
dabe958
Merge pull request #252 from covid19-miyazaki/ticket-251
korosuke613 Jun 1, 2020
08306da
20200706_宮崎県内の最新感染動向
koogawa Jul 6, 2020
e50142c
スクレイピングがずっと失敗しているので停止
koogawa Jul 6, 2020
02d9106
サイト構造がリニューアルしてスクレイピングに失敗しているので一時的に無効にする
koogawa Jul 6, 2020
ea20b4b
Fix: 日付のソート方法
Tatsumi0000 Jul 6, 2020
d43e495
Merge pull request #271 from covid19-miyazaki/update/20200705
korosuke613 Jul 6, 2020
87d8975
Merge branch 'development' into ticket-197
korosuke613 Jul 6, 2020
1c39210
Merge pull request #273 from Tatsumi0000/ticket-197
korosuke613 Jul 6, 2020
93a1dd2
Merge branch 'development' into issue/stop-ci
korosuke613 Jul 6, 2020
2cc4061
Merge pull request #272 from covid19-miyazaki/issue/stop-ci
korosuke613 Jul 6, 2020
9652e15
Merge branch 'master' into staging
korosuke613 Jul 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/news_scraping.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: scraping news
# サイト構造がリニューアルしてスクレイピングに失敗しているので一時的に無効にする
on:
schedule:
- cron: '0 */6 * * *'
push:
branches-ignore:
- '**'
# on:
# schedule:
# - cron: '0 */6 * * *'
jobs:
scraping:
runs-on: ubuntu-latest
Expand All @@ -26,7 +31,7 @@ jobs:
gem install bundler
bundle update --bundler
bundle install
ruby scraping.rb
ruby scrapingSource/scraping.rb
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v2
Expand All @@ -48,7 +53,7 @@ jobs:
SELENIUM_HOST: localhost
TZ: Asia/Tokyo
run: |
ruby scraping_data.rb
ruby scrapingSource/scraping_data.rb
if: steps.cpr.outputs.pr_number != 0
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/scraping.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Scraping CI
env:
TZ: 'Asia/Tokyo'
TZ: 'Asia/Tokyo'
# サイト構造がリニューアルしてスクレイピングに失敗しているので一時的に無効にする
on:
schedule:
- cron: '0 */6 * * *'
push:
branches-ignore:
- '**'
# on:
# schedule:
# - cron: '0 */6 * * *'
jobs:
scraping:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 宮崎県 新型コロナウイルス感染症対策サイト
# 宮崎県 新型コロナウイルス感染症対策サイト(非公式)

[![](https://github.com/covid19-miyazaki/covid19/workflows/production%20deploy/badge.svg)](https://github.com/covid19-miyazaki/covid19/actions?query=workflow%3A%22production+deploy%22)

[![宮崎県 新型コロナウイルス感染症対策サイト](/static/ogp.png)](https://covid19-miyazaki.netlify.com/)
[![宮崎県 新型コロナウイルス感染症対策サイト(非公式)](/static/ogp.png)](https://covid19-miyazaki.netlify.com/)

### 日本語 | [English](./docs/en/README.md)

Expand Down
2 changes: 1 addition & 1 deletion assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"宮崎県": "Miyazaki",
"新型コロナウイルス感染症": " COVID-19",
"menu/新型コロナウイルス感染症": "Tokyo COVID-19 Information",
"対策サイト": " Task Force website",
"対策サイト": " Task Force website(unofficial)",
"menu/対策サイト": " ",
"最終更新": "Last update",
"注釈": " This is a provisional translation. Please be aware that there may be mistranslations.",
Expand Down
2 changes: 1 addition & 1 deletion assets/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"宮崎県": "宮崎県",
"新型コロナウイルス感染症": "新型コロナウイルス感染症",
"menu/新型コロナウイルス感染症": "新型コロナウイルス感染症",
"対策サイト": "対策サイト",
"対策サイト": "対策サイト(非公式)",
"menu/対策サイト": "対策サイト",
"最終更新": "最終更新",
"注釈": "This is a provisional translation. Please be aware that there may be mistranslations.",
Expand Down
2 changes: 1 addition & 1 deletion components/SideNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default Vue.extend({
{
title: this.$t('知事からのメッセージ'),
link:
'https://www.pref.miyazaki.lg.jp/kansensho-taisaku/kenko/hoken/comment_covid19.html'
'https://www.pref.miyazaki.lg.jp/sogoseisaku/kenko/hoken/20200529_message.html'
},
{
title: this.$t('当サイトについて'),
Expand Down
24 changes: 18 additions & 6 deletions data/data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lastUpdate": "2020/06/08",
"lastUpdate": "2020/07/06",
"patients": {
"date": "2020/06/08",
"date": "2020/07/05",
"data": [
{
"リリース日": "2020-03-04T08:00:00.000Z",
Expand Down Expand Up @@ -138,24 +138,32 @@
"性別": "女性",
"退院": "退院",
"date": "2020-05-09"
},
{
"リリース日": "2020-07-05T08:00:00.000Z",
"居住地": "宮崎市",
"年代": "40代",
"性別": "男性",
"退院": "入院中",
"date": "2020-07-06"
}
]
},
"main_summary": {
"attr": "検査実施人数",
"value": 1414,
"value": 1609,
"children": [
{
"attr": "陽性患者数",
"value": 17,
"value": 18,
"children": [
{
"attr": "入院中",
"value": 0,
"value": 1,
"children": [
{
"attr": "軽症・中等症",
"value": 0
"value": 1
},
{
"attr": "重症",
Expand Down Expand Up @@ -248,6 +256,10 @@
{
"日付": "2020-04-11T08:00:00.000Z",
"小計": 1
},
{
"日付": "2020-07-05T08:00:00.000Z",
"小計": 1
}
]
},
Expand Down
52 changes: 6 additions & 46 deletions data/news.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,14 @@
{
"newsItems": [
{
"date": "2020年4月11日",
"url": "https://www.pref.miyazaki.lg.jp/kohosenryaku/kenko/hoken/covid19_20200411.html",
"text": "新型コロナウイルス感染症患者(第17例目)の発生について(第一報)"
"date": "2020年5月29日",
"url": "https://www.pref.miyazaki.lg.jp/sogoseisaku/kenko/hoken/20200529_message.html",
"text": "新型コロナウイルス感染症に関する知事メッセージ(令和2年5月29日)"
},
{
"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例目)の発生について(続報)"
"date": "2020年5月29日",
"url": "https://www.pref.miyazaki.lg.jp/kansensho-taisaku/kenko/hoken/kinkyujitaisengen_covid19.html",
"text": "「新しい生活様式」の実践へ"
}
]
}
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config: Configuration = {
htmlAttrs: {
prefix: 'og: http://ogp.me/ns#'
},
titleTemplate: '%s | 宮崎県 新型コロナウイルス感染症対策サイト',
titleTemplate: '%s | 宮崎県 新型コロナウイルス感染症対策サイト(非公式)',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "covid19",
"version": "1.0.0",
"description": "宮崎県 新型コロナウイルス感染症対策サイト",
"description": "宮崎県 新型コロナウイルス感染症対策サイト(非公式)",
"author": "covid19-miyazaki",
"private": true,
"engines": {
Expand Down
11 changes: 0 additions & 11 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@
<t-i18n>{{ $t('注釈') }}</t-i18n>
</div>
</div>
<static-info
class="mb-4"
:url="
'https://www.pref.miyazaki.lg.jp/kansensho-taisaku/kenko/hoken/kinkyujitaisengen_covid19.html'
"
:text="
$t(
'第2波第3波に備えて「新しい生活様式」の実践へ!'
)
"
/>
<whats-new class="mb-4" :items="newsItems" />
<static-info
class="mb-4"
Expand Down
3 changes: 3 additions & 0 deletions scraping.rb → scrapingSource/scraping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

# スクレイピング
driver.navigate.to(ENV['URL'])
if (driver.find_elements(:class => "list_table").size == 0)
exit
end
list_table = driver.find_element(:class => "list_table")
dates = list_table.find_elements(:class => "date")
urls = list_table.find_elements(:tag_name => "a")
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion utils/formatTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export default (data: DataType[]) => {
}
tableDate.datasets.push(TableRow)
})
tableDate.datasets.sort((a, b) => (a === b ? 0 : a < b ? 1 : -1))
tableDate.datasets
.sort((a, b) => dayjs(a.公表日).unix() - dayjs(b.公表日).unix())
.reverse()
return tableDate
}