Youtube: api/stats/qoe metrics - youtube-api

I am researching Youtube APIs, backend calls like "watchtime", "api/stats/qoe". I am unable to find definitions of the query string metrics.
For example,
I got these metrics from "api/stats/qoe", but I don't know what they mean?
fmt: 244
afmt: 251
cpn: 53sXf1ssOnU0CWnv
ei: unq1X4-zMdyN8wTS5aKACQ
el: detailpage
docid: 5HVHnUmRL6U
ns: yt
fexp: 23735347%2C23744176%2C23804281%2C23839597%2C23856950%2C23857949%2C23868322%2C23882502%2C23884386%2C23890959%2C23895671%2C23911055%2C23915993%2C23918597%2C23927767%2C23927767%2C23934970%2C23935844%2C23940248%2C23940704%2C23942338%2C23942633%2C23944779%2C23945479%2C23946420%2C23948841%2C23951620%2C23955372%2C23956524%2C23958572%2C23958692%2C23961732%2C23964530%2C23965224%2C23965756%2C23966254%2C23966412%2C23966725%2C23967043%2C23968560%2C23968756%2C23970847%2C23970974%2C23972773%2C24500568%2C24590298%2C24631715%2C24631744%2C3300106%2C3300131%2C3300164%2C3313321%2C3318700%2C3318773%2C3318889%2C3319220%2C3320540%2C3329303%2C9449243
cl: 342543027
seq: 3
cbr: Chrome
cbrver: 86.0.4240.198
c: WEB
cver: 2.20201117.01.00
cplayer: UNIPLAYER
cos: Windows
cosver: 10.0
cmt: 0.762:0.000,1.012:0.011,1.943:0.924,10.039:9.020
vps: 0.762:B,1.012:PL,10.039:PL
user_intent: 0.031
bwm: 10.039:3241322:1.280
bwe: 10.039:2551061
bat: 10.039:1:1
vis: 10.039:3
bh: 10.039:30.764
df: 10.039:0
Can someone point me in the right direction where I can get definitions of these metrics? I am specifically looking for watch start time & watch end time of a video.

Some fields I can get from the name or data:
fmt: ?
afmt: ?
cpn: ?
ei: ?
el: ?
docid: Video Hash (same as: /watch?v=<video_hash>)
ns: Most likely "Name Server" because value is yt short for YouTube
fexp: Values separated by commas, no idea but seem to start with 23-24 in most cases.
cl: ?
seq: Sequence number for packets
cbr: Client Browser (Chrome, Firefox)
cbrver: Client Browser version (version of Chrome or Firefox)
c: Client, so if website is open, this will be WEB. Mobile might have something else.
cver: Client Version major.YYMMDD.minor.patch
cplayer: Client Player, Kind of player used. UNIPLAYER for web.
cos: Client OS, Windows/Linux/Mac
cosver: Client OS version, 10.0 will be Windows 10 (in combination with cos)
cplatform: Client Platform: eg. DESKTOP
cmt: ? But not always present
vps: ?
user_intent: ?
bwm: ? But all following values seem related, they are always close together
bwe: ? Always seem to increase once page is open, so maybe time user has watched the video?
bat: ?
vis: ?
bh: ?
df: ?
Hope this will help the next person and maybe someone can fill in the blanks.

Related

https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("ARSARS")&env=store://datatables.org/alltableswithkeys

I have been using the following URL for the past 3 years without issue. However, it has stopped returning results.
URL:
https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("ARSARS")&env=store://datatables.org/alltableswithkeys
Now returns the following:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="0" yahoo:created="2017-11-02T09:33:25Z" yahoo:lang="en-AU">
<results/>
</query><!-- total: 9 -->
Notice how there are no results, it simply has the tag "results".
I have tried on this many different computers and browsers. I have also tried changing the currency combinations, but no luck.
Can anybody spot what I am doing wrong?
Yes, it looks like Yahoo has discontinued their Currency Converter API service.
I found a different site : https://currencylayer.com/
They let you request currency rates (1 USD = 168 other currencies). If you make less than 1000 requests per month, it is free (if you need more, they have different subscriptions : https://currencylayer.com/product).
You just need to sign up and receive your own Access Code. Once you have that, then you simply make the call http://apilayer.net/api/live?access_key= and it will return JSON of the other currency rates.
They also have code examples in PHP, JavaScript, and Java at https://currencylayer.com/documentation
Found it very easy to get started using their API right away.
I think the API is down.
I am similarly receiving "results"=nullfor the query:
http://query.yahooapis.com/v1/public/yql?q=select+%2A+from+yahoo.finance.xchange+where+pair+in+%28%22GBPEUR%22%29&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
Setting diagnostics=true in the request yields:
`
[execution-start-time] => 7
[execution-stop-time] => 12
[execution-time] => 5
[http-status-code] => 999
[http-status-message] => Request denied
[content] => http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=snl1d1t1ab
`
If anyone knows more than me about what this might imply I'd be glad to hear it!
Yahoo is aware of this issue and their engineers are working on it:
ref: https://forums.yahoo.net/t5/Yahoo-Finance-help/http-download-finance-yahoo-com-d-quotes-csv-s-GOOG-amp-f/td-p/387096
Very sadly and quite outrageously Yahoo decided to stop this service without any warning.
See admin message here
So many services depend on it, it's like Google saying they would suddenly stop their maps API... At this point I am blocking yahoo in our DNS so no one in our company will ever use Yahoo again since they are not a reliable entity.

Convert DAO extraBalance to Ether or Bitcoin

I'm a noob in cryptocurrencies and still hold some DAO_extraBalance tokens in MyEtherWallet. I want to convert these DAO_extraBalance tokens into Ether tokens (ETH) or Bitcoins (BTC). I've browsed through some old messages and found that support to convert DAO_extraBalance tokens to ETH or BTC halted via MyEtherWallet, Jaxx and Poloniex.
Furthermore, other options are quite complex, such as issuing an ExtraBalDaoWithdraw contract via: https://etherscan.io/address/0x755cdba6AE4F479f7164792B318b2a06c759833B#code.
I hope anyone can help me out with a step-by-step procedure - for dummies - how to convert DAO_extraBalance to ETH or BTC. A YouTube video with such a procedure would also help. Thanks in advance.
Download dist-v3.3.7.zip from MyEtherWallet v3.3.7 to your computer drive
Unzip the dist-v3.3.7.zip file
Double click on index.html
Click on the Withdraw DAO at the bottom of the page
Upload your Keystore File (UTC / JSON) and you will see the following screen (there are 0 refunds for the account shown):
Read more: https://medium.com/curator-multisig-phf-official-channel/dao-token-holders-come-claim-your-money-b428f186572a
See also: https://theethereum.wiki/w/index.php/The_DAO_Refunds#How_Do_I_Withdraw_The_DAO_Refunds.3F

WWW server reports error after POST Request by Internet Direct components in Delphi

I'm using Delphi XE4 and i usually use Indy with IdHttp.POST to POST request to websites,
This time, whenever i try to POST the request i get Error: Your browser is not sending the correct data.
I'm very sure that I'm POSTing the right data, and i'm using the IOHandler and CookieManager.
Been dealing with this for days(literally)
Here is the code(the site in the code):
procedure TForm1.Button1Click(Sender: TObject);
var s, lge, Kf1, Kf2, Kf3, Kf4 : String;
lParam : TStringList;
begin
S := http.Get('https://www.neobux.com/m/l/');
Memo1.Lines.Add(S);
getParamLge(s,lge,'lge');
GetInput(s,Kf1,'id="Kf1"');
GetInput(s,Kf2,'id="Kf2"');
GetInput(s,Kf3,'id="Kf3"');
GetInput(s,Kf4,'id="Kf4"');
lParam := TStringList.Create;
lParam.Add('lge='+lge);
lParam.Add(Kf1+'=USERNAME');
lParam.Add(Kf2+'=PASSWORD');
lParam.Add(Kf3+'=');
lParam.Add(Kf4+'=');
lParam.Add('login=1');
memo1.Lines.Add(http.Post('https://www.neobux.com/m/l/', lParam));
end;
(the getParamLge and GetInput function, are just simple copy and pos functions to extract value from the GET respone).
I thought maybe it needed cookies so i've added this in the beginning:
Cookie.CookieCollection.Clear;
Cookie.CookieCollection.AddClientCookies('CFID=21531887; CFTOKEN=20369251; dh=20130709111845,1920x1080,{ts ''2013-07-09 06:18:58''}; __utma=90161412.436822896.1373368451.1373368451.1373368451.1; __utmb=90161412.11.10.1373368451; __utmc=90161412; __utmz=90161412.1373368451.1.1.'+'utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __asc=06ff77ad13fc32381fd1f5d6405; __auc=06ff77ad13fc32381fd1f5d6405; __atuvc=4%7C28; MS=flat');
But all in vain.
I'm very sure that I'm POSTing the right data
Since it does not work - obviously you do not (or Delphi does not - that makes no difference for server).
You should start usual debugging loop:
Observe reference working behaviour.
Observe your program behavior
Spot the difference
Eliminate the difference
Check if the program works now
If not - go to step 2.
Reference implementation would be some WWW browser working with site: Opera, Chrome, Firefox, MS IE, etc.
Observing tool would be some HTTP Sniffer like WireShark or OmniPacket or Microsoft Net Monitor or else, however this tinkers with OS work on rather deep level.
Or it can be local proxy with GUI, like Proxomitron or Membrane Monitor - but that would require special setup for both the program and the browser, to route their traffic through that local proxy.
Then you should read about HTTP, starting with shallow observation at Wikipedia and then opening related RFC documents (specifications of different part of HTTP protocol) so that you would understand what do the observed differences mean and how to fix them. For example many people use POST request when they actually should use GET request or such.
You want to debug HTTP program but for this HTTP logs, workign and borken, are required and your question lacks them. More so, most probably you can fix it your self, just bring your program's HTTP log to accordance with both RFCs theory and working browsers practice.

get DynamicSearchAd along with TextAd via Google Adwords API

Google provides nice examples of getting TextAd via API: https://code.google.com/p/google-api-adwords-php/source/browse/examples/v201209/BasicOperations/GetTextAds.php
I expected that getting DynamicSearchAd will be as easy as modifying line 54 to:
$selector->predicates[] = new Predicate('AdType', 'IN', array('TEXT_AD', 'DYNAMIC_SAERCH_AD'));
however for campaign with bunch of negative keywords, 0 postiive keywords and bunch of ads [ visible in the interface ] my result is buch of negative keywords and 0 ads, like they were not existing. I have googled for quite a long time already, but most recent post about keywordless ads is from 2012 and since then I believe that DynamicSearchAds went out from beta and are not available for everyone.
I played quite a little bit with sample example, changing fields [ like removing Headline and leaving only Id etc ], without success.
So my question is, how should I modify this example to obtain DSA ?
You've got missprint on constant in Predicate.
'DYNAMIC_SAERCH_AD' must be 'DYNAMIC_SEARCH_AD'

Why is COMMON_APPDATA returned as a null string on Windows XP

One of my users at a large university (with, I imagine, the aggressive security settings that university IT departments general have on their computers) is getting an empty string returned by Windows XP for CSIDL_COMMON_APPDATA or CSIDL_PERSONAL. (I'm not sure which of these is returning the empty string, because I haven't yet examined his computer to see how he's installed the software, but I'm pretty sure it's the COMMON_APPDATA...)
Has anyone encountered this or have suggestions on how to deal with this?
Here's the Delphi code I'm using to retrieve the value:
Function GetSpecialFolder( FolderID: Integer):String;
var
PIDL: PItemIDList;
Path: array[0..MAX_PATH] of Char;
begin
SHGetSpecialFolderLocation(Application.Handle, FolderID, PIDL);
SHGetPathFromIDList(PIDL, Path);
Result := Path;
end; { GetSpecialFolder }
ShowMessage(GetSpecialFolder(CSIDL_COMMON_APPDATA)); <--- This is an empty string
Edit:
Figuring out this API made me feel like I was chasing my tail - I went in circles trying to find the right call. This method and others similar to it are said to be deprecated by Microsoft (as well as by a earlier poster to this question (#TLama?) who subsequently deleted the post.) But, it seems like most of us, including me, regularly and safely ignore that status.
In my searches, I found a good answer here on SO from some time ago, including sample code for the non-deprecated way of doing this: what causes this error 'Unable to write to application file.ini'.
If you want to find out why an API call is failing you need to check the return values. That's what is missing in this code.
You need to treat each function on its own merits. Read the documentation on MSDN. In the case of SHGetSpecialFolderLocation, the return value is an HRESULT. For SHGetPathFromIDList you get back a BOOL. If that is FALSE then the call failed.
The likely culprit here is SHGetSpecialFolderLocation, the code that receives the CSIDL, but you must check for errors whenever you call Windows API functions.
Taking a look at the documentation for CSIDL we see this:
CSIDL_COMMON_APPDATA
Version 5.0. The file system directory that contains application data for all users. A typical path is C:\Documents and Settings\All
Users\Application Data. This folder is used for application data that
is not user specific. For example, an application can store a
spell-check dictionary, a database of clip art, or a log file in the
CSIDL_COMMON_APPDATA folder. This information will not roam and is
available to anyone using the computer.
If the machine has a shell version lower than 5.0, then this CSIDL value is not supported. That's the only documented failure mode for this CSIDL value. I don't think that applies to your situation, so you'll just have to see what the HRESULT status code has to say.

Resources