4 ms·
Not completely straightforward, but you could do something like this if you have curl and libxml2 installed: curl -s https://gdata.youtube.com/feeds/api/vi
by walrus 15y ago
Not completely straightforward, but you could do something like this if you have curl and libxml2 installed:
curl -s https://gdata.youtube.com/feeds/api/videos/oHg5SJYRHA0?v=2 | xmllint --format - | grep media:restriction
The 'oHg5SJYRHA0' part is the video ID from the URL for the video.
- diego 15y agoThanks. I updated the post and credited you. I posted this example (a Vevo video): curl -s https://gdata.youtube.com/feeds/api/videos/eAfyFTzZDMM?v=2 https://gdata.youtube.com/feeds/api/videos/eAfyFTzZDMM?v=2 | xmllint --format - | grep media:restriction shows: <media:restriction type="country" relationship="allow">BD BE BF BG BA BB WF BM BN BO BH BI BJ BT JM BW WS BR BS BY BZ RU RW RS TL RE TM TJ RO TK GW GU GT GR GQ GP GY GF GE GD GB GA SV GN GM GL GI GH OM TN IL JO HR HT HU HK HN VE PR PS PW PT PY IQ PA PF PG PE PK PN PL PM ZM EH EE EG ZA EC IT VN SB ET SO ZW SA ES ER ME MD MG MA MC UZ MM ML MO MN MH MK MU MT MW MV MQ MP MS MR UG MY MX VU FR SH FI FJ FK FM FO NI NL NO NA NC NE NG NP NR NU CK CI CH CO CN CM CL CA CG CF CD CZ CY CR CV CU SZ SY KG KE SR KI KH KN KM ST SK KR SI KP KW SN SM SL SC KZ KY SG SE SD DO DM DJ DK VG YE DZ US UY YT LB LC LA TV TW TT TR LK LI LV TO LT LU LR LS TF TG TD TC LY VA VC AE AD AG AF AI IS IR AM AL AO AN AQ AR AU AT IO IN TZ AZ IE UA QA MZ</media:restriction>