codeforjapan / codeforelection

衆院選2017候補者データベース作成プロジェクト This repo will be archived 🗄️ in the future
MIT License
32 stars 6 forks source link

議事録も参照できるようにする? #29

Closed hkwi closed 6 years ago

hkwi commented 6 years ago

その議員が過去何を発言していたかを検索できると嬉しい。

ただデータソースが こんな感じ なので、どうしたものか。

halsk commented 6 years ago

こういうAPIがあるのですが、発言者で引っ張ってきて表示できないですかね。 http://kokkai.ndl.go.jp/api.html 2017年10月4日(水) 14:08 Hiroaki KAWAI notifications@github.com:

その議員が過去何を発言していたかを検索できると嬉しい。

ただデータソースが こんな感じ http://www.shugiin.go.jp/internet/itdb_kaigiroku.nsf/html/kaigiroku/000119320170616035.htm なので、どうしたものか。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/codeforjapan/codeforelection/issues/29, or mute the thread https://github.com/notifications/unsubscribe-auth/AABAfTC-iRB1ZUKCFfCDG2w-ugbFpN6Aks5soxLOgaJpZM4PtGjG .

hkwi commented 6 years ago

いいですね。見てみたのですが kokkai.ndl.go.jp の API は CORS ヘッダである Access-Control-Allow-Origin 返してくれないのですね。なのでフロント JavaScript のみでの実装は難しそう。大量アクセスが出ると困りますし、対応方法はいくつか考えられますが、 HTML でいくなら、いずれにせよフロントからは別途準備したサーバから返さないとダメな感じですね。アプリならそのままでも大丈夫かも。

(API で返ってくるデータを dump して使ってもいいんだろうか…?)

halsk commented 6 years ago

いずれにせよサーバ立てるので、サーバサイドで処理しませう

ypresto commented 6 years ago

oO(このAPI、クエリ文字列の区切りの &%26 にURLエンコードしないといけないんですね・・w)

halsk commented 6 years ago

こちらに移動させました。 https://github.com/codeforjapan/codeforelection_front/issues/147