Youtube API – ユーチューブのカテゴリを取得する( VideoCategories: list)


GET https://www.googleapis.com/youtube/v3/videoCategories

partのみ必須になっていたけど、regionCodeも必要だった。。今回はJPを指定。
参照:https://developers.google.com/youtube/v3/docs/videoCategories/list#try-it


{
"kind": "youtube#videoCategoryListResponse",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/siiWQ_WM0OtxtxK7NUUJKFwqDRc\"",
"items": [
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"",
"id": "1",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Film & Animation",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"",
"id": "2",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Autos & Vehicles",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/nqRIq97-xe5XRZTxbknKFVe5Lmg\"",
"id": "10",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Music",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/HwXKamM1Q20q9BN-oBJavSGkfDI\"",
"id": "15",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Pets & Animals",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"",
"id": "17",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Sports",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/FJwVpGCVZ1yiJrqZbpqe68Sy_OE\"",
"id": "18",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Short Movies",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/M-3iD9dwK7YJCafRf_DkLN8CouA\"",
"id": "19",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Travel & Events",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/WmA0qYEfjWsAoyJFSw2zinhn2wM\"",
"id": "20",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Gaming",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/EapFaGYG7K0StIXVf8aba249tdM\"",
"id": "21",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Videoblogging",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/xId8RX7vRN8rqkbYZbNIytUQDRo\"",
"id": "22",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "People & Blogs",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/G9LHzQmx44rX2S5yaga_Aqtwz8M\"",
"id": "23",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Comedy",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/UVB9oxX2Bvqa_w_y3vXSLVK5E_s\"",
"id": "24",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Entertainment",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/QiLK0ZIrFoORdk_g2l_XR_ECjDc\"",
"id": "25",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "News & Politics",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/r6Ck6Z0_L0rG37VJQR200SGNA_w\"",
"id": "26",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Howto & Style",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/EoYkczo9I3RCf96RveKTOgOPkUM\"",
"id": "27",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Education",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/w5HjcTD82G_XA3xBctS30zS-JpQ\"",
"id": "28",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Science & Technology",
"assignable": true
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/lL7uWDr_071CHxifjYG1tJrp4Uo\"",
"id": "30",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Movies",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/WnuVfjO-PyFLO7NTRQIbrGE62nk\"",
"id": "31",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Anime/Animation",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/ctpH2hGA_UZ3volJT_FTlOg9M00\"",
"id": "32",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Action/Adventure",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/L0kR3-g1BAo5UD1PLVbQ7LkkDtQ\"",
"id": "33",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Classics",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/pUZOAC_s9sfiwar639qr_wAB-aI\"",
"id": "34",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Comedy",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/Xb5JLhtyNRN3AQq021Ds-OV50Jk\"",
"id": "35",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Documentary",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/u8WXzF4HIhtEi805__sqjuA4lEk\"",
"id": "36",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Drama",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/D04PP4Gr7wc4IV_O9G66Z4A8KWQ\"",
"id": "37",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Family",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/i5-_AceGXQCEEMWU0V8CcQm_vLQ\"",
"id": "38",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Foreign",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/rtlxd0zOixA9QHdIZB26-St5qgQ\"",
"id": "39",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Horror",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/N1TrDFLRppxZgBowCJfJCvh0Dpg\"",
"id": "40",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Sci-Fi/Fantasy",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/7UMGi6zRySqXopr_rv4sZq6Za2E\"",
"id": "41",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Thriller",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/RScXhi324h8usyIetreAVb-uKeM\"",
"id": "42",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Shorts",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/0n9MJVCDLpA8q7aiGVrFsuFsd0A\"",
"id": "43",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Shows",
"assignable": false
}
},
{
"kind": "youtube#videoCategory",
"etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/x5NxSf5fz8hn4loSN4rvhwzD_pY\"",
"id": "44",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Trailers",
"assignable": false
}
}
]
}

Cordova Plugin作成 ( plugin.xml記載ミスでassets全部消えた。。)

<resource-file src=”res/assets/cordova-plugin-4assets.js” target=”assets” />

target-dirとtargetを記載ミスしてました。

正しくは、

<resource-file src=”res/assets/cordova-plugin-4assets.js” target=”assets/cordova-plugin-4assets.js” />

<resource-file src=”res/assets/cordova-plugin-4assets.js” target-dir=”assets/” />

プラグイン削除時にtargetも消されるので、assetsごと消されました。

(TensorFlow + keras ) Epoch 50/50 終わったと思ったら。。ImportError: `save_model` requires h5py.

2000/2000 [==============================] – 396s – loss: 1.1921e-07 – acc: 1.0000 – val_loss: 1.1921e-07 – val_acc: 1.0000

Traceback (most recent call last):

  File “image_classify.py”, line 24, in <module>

    model.save(“image_classifier.h5”)

  File “/usr/local/lib/python2.7/site-packages/keras/engine/topology.py”, line 2553, in save

    save_model(self, filepath, overwrite, include_optimizer)

  File “/usr/local/lib/python2.7/site-packages/keras/models.py”, line 56, in save_model

    raise ImportError(‘`save_model` requires h5py.’)

ImportError: `save_model` requires h5py.

my-mbp:sd201708_sp1_ch02_sample_rev1 UtaX86$ 

 

pip install h5py