Skip to content

Commit

Permalink
daily data update
Browse files Browse the repository at this point in the history
  • Loading branch information
liang-zhengxin committed Dec 8, 2021
1 parent da5e805 commit 665de3a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/latest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"dailyLocalCases": {
"06-12-2021": 638
"07-12-2021": 700
},
"dailyVaxDataPercent": {
"05-12-2021": {
"06-12-2021": {
"completed": 87,
"first": 87,
"booster": 28
Expand Down
1 change: 1 addition & 0 deletions data/dailyLocalCases.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"07-12-2021": 700,
"06-12-2021": 638,
"05-12-2021": 523,
"04-12-2021": 707,
Expand Down
5 changes: 5 additions & 0 deletions data/dailyVaxDataPercent.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"06-12-2021": {
"completed": 87,
"first": 87,
"booster": 28
},
"05-12-2021": {
"completed": 87,
"first": 87,
Expand Down
25 changes: 25 additions & 0 deletions scraper/mohscraper2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Singapore Ministry of Health RSS Feed Scrapper
Version 2.0
"""
# Import Required Modules

import requests
import json
import xmltodict
import datetime
from bs4 import BeautifulSoup

# Getters and Setters

def get_MOH_website():
data = requests.get('https://www.moh.gov.sg/')
data = BeautifulSoup(data.content, "html.parser")
return data

def get_COVID_data(data):
mydivs = data.find_all("div", {"class": "stat-item"})
mydivs = mydivs.find_all("div", {"class": "number"})
print(mydivs)

print(list(get_MOH_website().children))

0 comments on commit 665de3a

Please sign in to comment.