如果我有YouTubevideourl,有没有办法使用PHP和cURL从YouTube API获取关联的缩略图?
我试图parsing从curl请求返回的JSON,如下所示: curl 'http://twitter.com/users/username.json' | sed -e 's/[{}]/''/g' | awk -vk="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' 上面的代码将JSON分成了几个字段,例如: % … "geo_enabled":false "friends_count":245 "profile_text_color":"000000" "status":"in_reply_to_screen_name":null "source":"web" "truncated":false "text":"My status" "favorited":false % … 如何打印特定字段(用-vk=text )?