Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新メンバー対応 #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion scraping/hinatazaka/blogUrls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"hamagishihiyori": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=17",
"matsudakonoka": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=18",
"miyatamanamo": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=19",
"watanabemiho": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=20",
"kamimurahinano": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=21",
"takahashimikuni": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=22",
"morimotomarii": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=23",
Expand Down
299 changes: 299 additions & 0 deletions scraping/hinatazaka/converted.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
[
{
"name_ja": "\u6f6e \u7d17\u7406\u83dc",
"birthday": "1997\u5e7412\u670826\u65e5",
"height": "157cm",
"blood_type": "O\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/ushiosarina.jpeg"
},
{
"name_ja": "\u5f71\u5c71 \u512a\u4f73",
"birthday": "2001\u5e745\u67088\u65e5",
"height": "155cm",
"blood_type": "O\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=4",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/kageyamayuuka.jpeg"
},
{
"name_ja": "\u52a0\u85e4 \u53f2\u5e06",
"birthday": "1998\u5e742\u67082\u65e5",
"height": "160.5cm",
"blood_type": "A\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=5",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/katoushiho.jpeg"
},
{
"name_ja": "\u9f4a\u85e4 \u4eac\u5b50",
"birthday": "1997\u5e749\u67085\u65e5",
"height": "155.5cm",
"blood_type": "A\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=6",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/saitoukyouko.jpeg"
},
{
"name_ja": "\u4f50\u3005\u6728 \u4e45\u7f8e",
"birthday": "1996\u5e741\u670822\u65e5",
"height": "167.5cm",
"blood_type": "O\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=7",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/sasakikumi.jpeg"
},
{
"name_ja": "\u4f50\u3005\u6728 \u7f8e\u73b2",
"birthday": "1999\u5e7412\u670817\u65e5",
"height": "165cm",
"blood_type": "O\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=8",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/sasakimirei.jpeg"
},
{
"name_ja": "\u9ad8\u702c \u611b\u5948",
"birthday": "1998\u5e749\u670820\u65e5",
"height": "157cm",
"blood_type": "A\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=9",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/takasemana.jpeg"
},
{
"name_ja": "\u9ad8\u672c \u5f69\u82b1",
"birthday": "1998\u5e7411\u67082\u65e5",
"height": "162cm",
"blood_type": "B\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=10",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/takamotoayaka.jpeg"
},
{
"name_ja": "\u6771\u6751 \u82bd\u4f9d",
"birthday": "1998\u5e748\u670823\u65e5",
"height": "154cm",
"blood_type": "O\u578b",
"generation": "1\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=11",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/higashimuramei.jpeg"
},
{
"name_ja": "\u91d1\u6751 \u7f8e\u7396",
"birthday": "2002\u5e749\u670810\u65e5",
"height": "163cm",
"blood_type": "O\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=12",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/kanemuramiku.jpeg"
},
{
"name_ja": "\u6cb3\u7530 \u967d\u83dc",
"birthday": "2001\u5e747\u670823\u65e5",
"height": "154cm",
"blood_type": "B\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=13",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/kawatahina.jpeg"
},
{
"name_ja": "\u5c0f\u5742 \u83dc\u7dd2",
"birthday": "2002\u5e749\u67087\u65e5",
"height": "161cm",
"blood_type": "O\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=14",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/kosakanao.jpeg"
},
{
"name_ja": "\u5bcc\u7530 \u9234\u82b1",
"birthday": "2001\u5e741\u670818\u65e5",
"height": "165.5cm",
"blood_type": "A\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=15",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/tomitasuzuka.jpeg"
},
{
"name_ja": "\u4e39\u751f \u660e\u91cc",
"birthday": "2001\u5e742\u670815\u65e5",
"height": "156.5cm",
"blood_type": "AB\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=16",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/nibuakari.jpeg"
},
{
"name_ja": "\u6ff1\u5cb8 \u3072\u3088\u308a",
"birthday": "2002\u5e749\u670828\u65e5",
"height": "167.5cm",
"blood_type": "A\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=17",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/hamagishihiyori.jpeg"
},
{
"name_ja": "\u677e\u7530 \u597d\u82b1",
"birthday": "1999\u5e744\u670827\u65e5",
"height": "157.5cm",
"blood_type": "A\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=18",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/matsudakonoka.jpeg"
},
{
"name_ja": "\u5bae\u7530 \u611b\u840c",
"birthday": "1998\u5e744\u670828\u65e5",
"height": "159.3cm",
"blood_type": "A\u578b",
"generation": "2\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=19",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/miyatamanamo.jpeg"
},
{
"name_ja": "\u4e0a\u6751 \u3072\u306a\u306e",
"birthday": "2004\u5e744\u670812\u65e5",
"height": "162.5cm",
"blood_type": "AB\u578b",
"generation": "3\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=21",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/kamimurahinano.jpeg"
},
{
"name_ja": "\u9ad9\u6a4b \u672a\u6765\u8679",
"birthday": "2003\u5e749\u670827\u65e5",
"height": "170cm",
"blood_type": "B\u578b",
"generation": "3\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=22",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/takahashimikuni.jpeg"
},
{
"name_ja": "\u68ee\u672c \u8309\u8389",
"birthday": "2004\u5e742\u670823\u65e5",
"height": "161.1cm",
"blood_type": "A\u578b",
"generation": "3\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=23",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/morimotomarii.jpeg"
},
{
"name_ja": "\u5c71\u53e3 \u967d\u4e16",
"birthday": "2004\u5e742\u670823\u65e5",
"height": "151.8cm",
"blood_type": "O\u578b",
"generation": "3\u671f\u751f",
"blog_url": "https://hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=24",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/yamaguchiharuyo.jpeg"
},
{
"name_ja": "\u77f3\u585a \u7476\u5b63",
"birthday": "2004\u5e748\u67086\u65e5",
"height": "154cm",
"blood_type": "A\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/ishizukatamaki.jpeg"
},
{
"name_ja": "\u5cb8 \u5e06\u590f",
"birthday": "2004\u5e748\u670815\u65e5",
"height": "157cm",
"blood_type": "O\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/kishihonoka.jpeg"
},
{
"name_ja": "\u5c0f\u897f \u590f\u83dc\u5b9f",
"birthday": "2004\u5e7410\u67083\u65e5",
"height": "164cm",
"blood_type": "B\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/konishinanami.jpeg"
},
{
"name_ja": "\u6e05\u6c34 \u7406\u592e",
"birthday": "2005\u5e741\u670815\u65e5",
"height": "165cm",
"blood_type": "AB\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/shimizurio.jpeg"
},
{
"name_ja": "\u6b63\u6e90\u53f8 \u967d\u5b50",
"birthday": "2007\u5e742\u670814\u65e5",
"height": "156.5cm",
"blood_type": "B\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/shougenjiyouko.jpeg"
},
{
"name_ja": "\u7af9\u5185 \u5e0c\u6765\u91cc",
"birthday": "2006\u5e742\u670820\u65e5",
"height": "153cm",
"blood_type": "AB\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/takeuchikirari.jpeg"
},
{
"name_ja": "\u5e73\u5c3e \u5e06\u590f",
"birthday": "2003\u5e747\u670831\u65e5",
"height": "156cm",
"blood_type": "A\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/hiraohonoka.jpeg"
},
{
"name_ja": "\u5e73\u5ca1 \u6d77\u6708",
"birthday": "2002\u5e744\u67089\u65e5",
"height": "157cm",
"blood_type": "A\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/hiraokamitsuki.jpeg"
},
{
"name_ja": "\u85e4\u5d8c \u679c\u6b69",
"birthday": "2006\u5e748\u67087\u65e5",
"height": "158cm",
"blood_type": "\u4e0d\u660e",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/fujishimakaho.jpeg"
},
{
"name_ja": "\u5bae\u5730 \u3059\u307f\u308c",
"birthday": "2005\u5e7412\u670831\u65e5",
"height": "162.2cm",
"blood_type": "\u4e0d\u660e",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/miyachisumire.jpeg"
},
{
"name_ja": "\u5c71\u4e0b \u8449\u7559\u82b1",
"birthday": "2003\u5e745\u670820\u65e5",
"height": "160cm",
"blood_type": "O\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/yamashitaharuka.jpeg"
},
{
"name_ja": "\u6e21\u8fba \u8389\u5948",
"birthday": "2009\u5e742\u67087\u65e5",
"height": "151cm",
"blood_type": "A\u578b",
"generation": "4\u671f\u751f",
"blog_url": "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000",
"img_url": "https://kokoichi0206.mydns.jp/imgs/hinata/watanaberina.jpeg"
}
]
30 changes: 30 additions & 0 deletions scraping/hinatazaka/converter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import json


def main():
with open("./detailed_infos.txt", mode="r", encoding='utf-8') as f:
x = json.load(f)
print(x)
with open("./blogUrls.txt", mode="r", encoding='utf-8') as f:
blogs = json.load(f)
converted = []
for k, v in x.items():
item = {}
item["name_ja"] = v["名前"]
item["birthday"] = v["生年月日"]
item["height"] = v["身長"]
item["blood_type"] = v["血液型"]
item["generation"] = v["generation"]
print(k)
if item["generation"] == "4期生":
item["blog_url"] = "https://www.hinatazaka46.com/s/official/diary/member/list?ima=0000&ct=2000"
else:
item["blog_url"] = blogs[k]
item["img_url"] = f"https://kokoichi0206.mydns.jp/imgs/hinata/{k}.jpeg"

converted.append(item)
print(converted)
with open("./converted.json", mode="w", encoding="utf-8") as f:
json.dump(converted, f, indent=2)

main()
Loading