Issue
When I query the following license server https://rbm-rtbf.live.ott.irdeto.com/licenseServer/widevine/v1/rbm-rtbf/license
, I got as response the following error messages
server reports: {"code":100100,"message":"The request is invalid. Error while parsing: contentId. Parameter null not expected as an array"}
server did not issue license, make sure you have correctly pasted all the required headers in the headers.py. Also check json/raw params of POST request.
URL used:
VIDEO URL: https://www.rtbf.be/auvio/detail_cobalt-l-envers-du-reve-electrique?id=2943776&t=649
MPD URL : https://c9851ec-az-westeurope.fsly.cdn.ebsd.ericsson.net/rtbf/auvio/assets/2943776_6BA97Bb/materials/KaFVNUi0Gg_6BA97Bb/vod-idx-2.ism/.mpd?
License URL: https://rbm-rtbf.live.ott.irdeto.com/licenseServer/widevine/v1/rbm-rtbf/license?contentId=2943776_6BA97Bb&keyId=7832df7f-bbd8-4082-9fb9-a1552efe6238&ls_session=eyJ0eXAiOiJKV1QiLCJraWQiOiIwOGIzODQwZS0wYThhLTQyYTItODNhNC03ZGM0Mzc0ZDJmYmEiLCJhbGciOiJIUzI1NiJ9.eyJhaWQiOiJyYm0tcnRiZiIsInN1YiI6IjhmZmZmNmYwMDI4ZTQ1ZmE5OTRmYTRlMDRiZTM0ZDJjXzZCQTk3QmIiLCJpYXQiOjE2NjUxNTk4MTksImV4cCI6MTY2NTE2MzQxOSwianRpIjoicE1abzlKd08wa2M4OFJyOFNjOU1vcWVMOUwxc1B3ZzVXS0lxUHVQbjVYVT0iLCJlbnQiOlt7ImVwaWQiOiJkZWZhdWx0IiwiYmlkIjoiYmVsZ2lhbl82QkE5N0JiIn1dLCJpc2UiOnRydWV9.T7NS1LasInS7QHczeOts6IfDpYqb2yFxZFNFo9mz4Ro
PSSH obtained: AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwIARIQeDLff7vYQIKfuaFVLv5iOBoIdXNwLWNlbmMiGGVETGZmN3ZZUUlLZnVhRlZMdjVpT0E9PSoAMgA=
Headers.py file
import requests
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Origin': 'https://www.rtbf.be',
'Connection': 'keep-alive',
'Referer': 'https://www.rtbf.be/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'cross-site',
'Content-Type': 'application/x-www-form-urlencoded',
}
params = {
'contentId': '2943776_6BA97Bb',
'keyId': '7832df7f-bbd8-4082-9fb9-a1552efe6238',
'ls_session': 'eyJ0eXAiOiJKV1QiLCJraWQiOiIwOGIzODQwZS0wYThhLTQyYTItODNhNC03ZGM0Mzc0ZDJmYmEiLCJhbGciOiJIUzI1NiJ9.eyJhaWQiOiJyYm0tcnRiZiIsInN1YiI6IjhmZmZmNmYwMDI4ZTQ1ZmE5OTRmYTRlMDRiZTM0ZDJjXzZCQTk3QmIiLCJpYXQiOjE2NjUxNTk4MTksImV4cCI6MTY2NTE2MzQxOSwianRpIjoicE1abzlKd08wa2M4OFJyOFNjOU1vcWVMOUwxc1B3ZzVXS0lxUHVQbjVYVT0iLCJlbnQiOlt7ImVwaWQiOiJkZWZhdWx0IiwiYmlkIjoiYmVsZ2lhbl82QkE5N0JiIn1dLCJpc2UiOnRydWV9.T7NS1LasInS7QHczeOts6IfDpYqb2yFxZFNFo9mz4Ro',
}
data = '\bé+T\nR\n<\bx2ß»Ø@¹¡U.þb8\busp-cenc"eDLff7vYQIKfuaFVLv5iOA==*2\0HÉjÌ|ì½:,:òý ¥08ÃÙªB+\nlicense.widevine.com¹Ì3:/w*À(¶5\nJC&()ë$Uõhýß´ÈèHÖh\0zoyôÀôTMßØøÖ<W;qÌ]ý´5L\bÊE«\xA0òÓî\0HÁûnÈo/õsä½!úÕMÈ JíUÖÑÃktÙ£cøÀc9i¦¥ëÏÀåÆ6ÔÂVy¬<jÓRævÞ¢À
ëÈÂá[ÑSl\fé¬Ý£¦(Ef&þË}æ²éûëëf2Àÿ¼1\fR|$*L§*®¡ÌÒá%?æ¯Ó~%n;ám{é]ZéKòyt\nF´°¼½ûòjgÇ\\»ð§õðìY³;ÿÝ@#ì6áÝL½íÁö}ÐtÐÚvSK:Mdì{°²/oJ)ó>må`páÖoaبR«9Ëz)Cæ°ï`p«QC¬zÔwmSz§|=oýpC@Í.¢ðAicýd6B*áà&ÊL6noEÆÜþNpZ
X.]¾ÈÚÔzõñÑöl^|Ø@õ.5Ï!¨Ö&ïÕh÷,T{H¦§jôöiâÀ½^*R_lèô©°uZh÷A«óªõ"zÙSñôf=EE\\pÎc§\xA0=¯@-Jkmú<KG\xA0u
BÕ\'nFüOóÌ÷æ"Ý-Gºxìª\f/0©J©ÔàhM+á$óLäÏ¡»9ÓUìdJò\r\'Iä?¸Õj_Íb§Ðý\\+Yp;÷raÞ7)}qîD6ÞYüæ[iaØ*¡\'ç?nç.]×@æQÙjeJÕZÝÍ
,QjYÖî.khéîËtéåGìBôèâéêl`þ\\KÐdí@{qàÑZÂÛn"©´7ßïl¥hKé±,pöç´:ÜôègMÀxq.û\'öóxçXQÇÜÿ¯s!§(Ø[Ûi1ëà\0ºAèZû=ò òó\\Ô?»¢¤^D5Rý5\n¥°Bü=ãk\\ìglF²ïÝÔ%ôØVàë9AÛ®;s×ÃÕóæýâÙlá¦INÒMtëí:ÖYT\0~N^^Ãì\xA0ÃïÍÂ%§3>ýR|?w%r`\t¯yà³Ýt¹J9¡?ù{ë°ègþ7\0;âÅ4Uû_exSá¸åâ²ËílÞl{±6Þ\rI´
]ÃßòÆ<{Ö\tÎèÃ÷/IÀkò¬÷ݨIËü=w#Qfv6¤§ïñ¾É·¶ãYbþïÝ¢/uè§zØÌ`÷Iùê×<ne0Ê¢ê*"i£*!ÿ«wìà±R0Σ\baè25¿F´ÿDX\ná(®®×féO\f-_Ó5´´auÔÊG^ÆWGqªÁ-ä.UrÁQ:½1~ómË´"¯o@µ9¾6x³¹Å¼Ãd|ãRþÕ2ËÄ4Ú^N=ýÖêó¢ÆßAï¿SÖ«§C\nÎÈLRérÿ0OÇwë¹ÌnÈÖüVÀz
ÍMÆím¯¬CÖ^\'ý»^Iam;A¨$\feNâëfÖϨ¢jq£/d¤=äÄC;гcEÉ·y×;Õ+i½rÖ¢ÕªDºpø¤R
Å!þÿÅ)ÖÃ*Ì[¿©R¥ÝCØ¿sÕbÈΪº+5ÙpÖ´Øаc¾\bu1Zo΢\\0+Á\bÖ´xÊ4
d^1Ïù¢¸PB¥ÍøÜRN®·¶ÅpýÍÜÌʾf*pê>M# 6*÷à_î,·¡6ê&ðÖ¦ûJÁ\'YNøÉÛG-dMü-}b¥¸ôÒ.Q\f+ÿFúJxƺª]ëÅÐÜ!R6Õg;żù/ËÛ[^\tà;yèU"RÖªíh[`#Ëm¤rÔÕa
`ÃØ3¼÷0+vfá±mvªü%%íõg\\Ùs@xáÉl¶^25xtxNÂcf¼ÝÆ´Û]ëøÌhÑJßÞ2t2o:EïX,ÖòÓÛ0~:vuoq¤£ÇL8æ2^AR*íò(|GUÿÿÇ$íaýÔ«ØJµ}\xA0\tZ¼B Ä,z÷ââKUþNwÀ¯ÄÏMÍ4BIñ)¬\0\0*J8¨J¾UT4Ubr,Õ´Ü"þ/Ôù+&oàädñ¹Ùñ$¢aöùÙ!¡hÙh.Q`18«AcNO\b·¥k$°-<Ã\')À=_$Ùêx]`IÄÔðÉ 1µ\xA0\0Ó; lSCIàÜ«ïKºcjµÏ5Þ4n.Jzazðë5×é¨8W¹Èûv(Ê)Új)"QÊ»õËíuh·óí5c8Þ¡\\¼¥ÙXE\bÝPrÑ43iVM1Ì\tq>üHF®õsSÐ<V
8;øp¾¤´^W¯Â\xA0Ñú1¯BÈ6OW½ÂaÌ%B^ÀìÃóuúà]¥hx*dRp?^Zb¦V*æÛzN^.\0hhhm\'n/õïÅ®è!ðìW³³\0ùdíN!TäLûO½YYï\b¯X*_ûW<#º>(Ç®=Õìg¨k.´Bxª9SûéZô7 Ó1&éd5{Î5|ä[bp\bü´q"íY@QÏEx£ëæâk>ÀÈ©ýQ,bÏ`ÄOsbÕpojßäsÅRáAÜø\nm×iÓMç3Ûì«U?ñÁàéXðÉ\r"±²\fêd«ÿøVÑâc!D&n+£§8vò´ñ#XÈJi ÊÔߦù\b¾ú\bÛ%ôûg2#Ñaåô½®ÊQÍÊ.§`ªsc\fRâ DýfO}äzdß¾×9ø|F«éÁ\rÍ-ö]\nÙ\fM©§ì¶Ñýê¡Q\0¶«ç¯]"È~ÿJÇat1øs°¦Õ¾}ºg-}½ÊwT´¾õ¾e\txã!\r§3í6aºÂ?P~}© \r %\t«XáCÈ>ë/dùø¦Ð®éÿÞ\\¡3K2Ö¹m×£)ó8ɶøº«Nw¿m\\9ü\n[Ka¿gÖFgLu¢aæ9":£1¯ZGcçÔýB¨^µL\b.$l¹líkG¯ÙN[[YHEÎBܪË5C±/£ÆAÿù\t½l@§û@q¹ÏM"\ròQ\0EÍ}6Þe²,-((üDRQã¦ÖVJ@\\ßñoÞ[ä)3mf*W±¼N@òª[«G
ïì¿
×z0¢á7(\'âfãG\'T\t\\¡ýú¦±Éï¿:]0e£y¶c\t²J¡2ÑuÓûFaNÎÉ.*»3Õt¶ÒK[0á_㣡ÿ^zß¡R4Yzß#Çü´\':GìuÊZA[w÷\bp~N]Ò°ÅVøZjî#5¤/Æû<]J°VÉë!2=IÆj7+¼Ë¾íùØ{û°óñÖàwpûòÙ®ì\xA0íÐJ´H¥uЩLÇ?Öù5#â4>iÝÿ*wy¥Å\r\xA0_à¬Þ]ytÍîd©9ºEâdÞ§wð¶ï°û&DW5)b¿à¾\'½©]{0ûÇ(¯ÛM-Ë@wÿabBv\rÁôÙGµt÷]?\niÜjÜî8KÁlæTÇ;unµ}©>Æÿ~×~ø}õãÖ±SP=/ÿ+n³¤1óZ@¢Ó>HKX]oä\fu`H²µç©¢íQl¿1pÊ°ûÒ#ÿ%÷=§ Ï{CF·Ñ¯Iù"YpÒ#9\0±É¹D@_±#IZÂ<ÊÆn;®í¯·å[.à÷C\rº,e¤~ìfjÝ!ÛxR-¯:Ú\t¡aèA6B4¬³Ð¹Ï´ÔÉø&ºNYß{«Ív3]wHlË
@ö==\ts7kRWÝæ(ü<=\n&gms0ç\fÏB\b$_jC÷fò´Ý|JwW*ÇbÚ[%Z´?¥tvÈA\\ï;_Ñ[ööù9ÆéOËÔø@âñWó@\0¯g3+Y(ß °ï¼ëÍ3áæù\r03ÂN18M\xA0o;-úÎ*èéu«9?78\rÇR
$Ü!óÏ¢¦îHÔ(pTâ]6\\¥0 ß´r%¨xC»Ä¢R\xA0äÝEÀÌüõ.&$äh§¾h®î\0&{¢«XµE?û1N?@ø##ofª5¤\xA0Û«\0èÁ^m¶üpÁ¦.<É{*\xA0ÛðÂÜ\n:ż¨çkÓ.߯\rÈAÿè\0k¶\nøÕtXË1:¹;åìaöÒPó_
b¾p÷§}ÜÐ`áÖÁ-+;â¦|&õYÔ©*g#DØáñJû¦£ô3}\xA0nûËFeÿÉC½ÏK/!ùZ¤eËZCóWþò\t\bι+kji©1R
¾QÝ$ðäàòãLCùÖESU9Ñ%+¢â_õÿ^«P6mfÖ¼ïnl¹Ý6tm;8Xåã+rëZ¼½3sÔóS\tî.!"5ÿé ÂÏ;>ð\n¨w9njï@Î[p¿nÌð^;Iø/ùç+PÝàÅK-NZ¦!Ñ9ô©5_\b©IULýK÷3À¢¸Íÿq¿MÙS-bF¨3 ò£¤ìb7fÃûßÃRò5ÐL°Ë\tmeuS±·Áú®{ëóõï\n*,>hCvk[8ÒÊ*\'wU:Òkªñ½)=Y¨²ÿºeUÝx,}\b^ÈkºÞåªiCJc-o*8xÀ»Ð~93]È\f¦Ôº.t6Üùi¼"ã[ïеzNUü¡ÏÁVíGÙ1r¡}(hi±îÓ¦Uþ¯c/wbþÄm5¿Q±èñ\'o9¡¾ÌToÞÝÌñ@È1äuר/#w
_·:nAÎqDÕ>àc7ã%#Æ]³´¢T6k7_=t/lë¢ë ajêfhøkp¢dWNçËØN\'ïg^¾ô\tlàð].Òü<n=Go«ù@VjòX\f§ùewVp&òÜ=¬B3³î\\T× ^ÞSå\xA0wÃ83õ"mÆL,áVGþzd@ís$õþóÀ~\nºòM\0&¾hk?×òßÇHÄg{N2RÔÈб7O;/Ov:Ó×\fÁ;¯O¶ k!=Óø\f2[~#4<θ6#ýþñüX×\r:\0ìr×èr+TTk<ߣûªV¸LSxßÈA1»÷¾iR7¹JS¤\b tV]YM\rÝÇ.â\bBRÅ{\táÆ®\'ËÆþyÊCtçð·\r Ï
óàâA\fàØO¤\\6Ã"?ÃPKEh®Pôú÷BF¤K*?ÿü_¥ÚQ Gìhf8<s<\bXÔ9»À=\\BÙ&¸¿ÁbNV0HËiâmsh`%6ØË))3Þ±lÒ\tÈÀÇÅó}&ÕØÑ\0\xA0¤f\b*?xvKñúÎÍ5A8fêÜÿ#ooâ Äö<.R&âtðDuÎàpñ¬H¿xíHTPÏA-ÑÆ7Ý`β¤ßF»6TÔ¤5#þH¥¸«zt8gîD¡?Æ\0î½&ùã5ª,»N-:ÎåbÕ\bV¨Nû\fP$mNXÚQª½QKøû´¯"çRð§/
å7Ю½ûVXeäÆlÈÒâÚÉà:=ú+øñýpTóÙ¢Â2dÚK]÷_Û\\§¼QíüCL~,n"v,ûÄbÂuÖìÄÏ=ÅJ&l§tÆ¡þkÇrùè¡Z-¹ëk#´aw¹G\\GÄ\\õhf®GÀ¹Ú×·Rs=¤¾í½iúQ<>Ñ&ÕT§Ü\tlæú@ë¸ãýH^çÂàl¯úWáÈPÚÿBfg>Öú¨ÿCI7QõûÝÙÛ?´®Pb[ß\b÷o½ÏLþüNíßív~ÞÜ¿éQíµK!ÀíE\0ÇåyÂ6/nW¶üÔ°
§úXzu\xA0gq,a\\ó¦¨;Æ:4ÓÃ2¤Qc¥@\'Óé4é@¦RSwð\'iV"aؽj¼T($<g\'C-ÁEÆ5¬¼ÿ^N¦°·à~õn,ÒnÀûmð{ÈëÑÒ¡ÓÙxÍòPÎ`? ä1%ïòVÜt×Ø?âKŬ¨öñ&v@DàZ×\'ÏÙL¾Îõ~ÜD±ïC³+?Q×9)øzntÖéTh1àS§¨üD*$ÀâtèûÏÃÙv\0§\xA0x«ðZ&ÿÿ-¢:m°ø¶ûs\\ò(ÖÉ/@\f¬¹hLÄتï¶%ÉZ3)GHºMÒ\0:²\'(¡ºgYË«Ý,}ê½ôã&w²¾æzÛåççÛ}luH"$ñU ©K\r´WqßCý¼*lÅÞæç³@nèîG
²ÇvÍ:dRA
_Võ¼ßÅ[e|IYíp{d]{%UbE¬âP:,\r(aõX^òAúÛG£ì4HGnMµGý#°¹\\Hà~±¼´\fú\xA0éúcZj¬\rWááßórQW_7C¶í)û3Z,[Ì¿vûåôb: »`ÜèïV¿-=òV¤9Æ7ßM"\n÷Éo|rBͳ¬ß7ëêk9¦Ò6nÂ@5¸DÖ¥ã<\r×oIDfí¶Í\0$`Ä:°e©iÞAðm".®ß×óÌÚZni®í[Å\fA¼0-\fÓ\b \0ëcFGÍç"®2tM!ôöÝi¥Q{J¦mÄUÝùrlÆ&\'µ|ºç4^ÊÝ£}#²aÛS[\n*v~X\b÷7ú:"3Ǿw=9SÛ\n¦P]ï¼\0-4\fÇ<d¼P38ÉÂ6×NQJ\0\0\0\0\0\0\0\05VJC-ýiS'
response = requests.post('https://rbm-rtbf.live.ott.irdeto.com/licenseServer/widevine/v1/rbm-rtbf/license', params=params, headers=headers, data=data)
# params inserted below will be passed to data-raw
token = 'PFYtFSqWMYIROJYywBp0rbKvpD3z6N6E6UezNrZmCeKHkcJ5BiH4J8qwO0kfWOmrSsyFJMg9OqKKEwvuQiXL4qdDTa6ZYplNV9IQt6eEuveglDxjVlYd0vAecS5TZKn5mIs01YxcYNlTC7tu3BIk63JhMykMWEMmj1oEqaLa7N3ZrfU2VTlEPaWXBQV6PxnFeD022Yi298GOX/lDik7sXt5u4duT0aKIYbz0HPmjoh8b9Uy8bvzJUa0/SlgRcsW8RNTNjRJHM6N7BESCBGFEZcWoSXeDLEblEfRoBKro2iDGB1neLfRdY1fj7tJX1Rn9lj+OJwRTrBV4XoTQFuSsFwvYCeQfkAoRHXnze9njI5pY7sYgIGxuM4Zh3Wqaps6kxdO53QMm0jJ/L41X6r5CikSGKQ3Rcps8eQccZb9svEuyXMof2nm+eYL+AVPPrfmAf/BrmUHfiuF9CmNsF9pI7PjJfLeASmh3KDI/5gUuC4uJB7rjTzHVWNRz8MSvYjJ37/5V9+FTihpu04+0jFZ1AlGRks2dzk2IGvm5WcwUhsW2l/oQXlh7AgsksIl2DT0wH11WeG+h1/ijymMcG9AZzsxtkC53eLJ8bl55/Aag0TJfX4N6KvV7UhglXxkLifb06bLK/wlcGCfb01b4cnngcjPJEMxh2+Q7sJSnbyrtsfodzNah8JXITmx5kTkFFZkdtga1ha9jAb+Z40VMQfbrCLgh0GEe2G3VczcIt8QHAWAeS91TkzLbMRAugbgLvdbI8yQXtM15uo+TXrV4PNFprug33AnvnQu7IpNxlmgPMZhEn4Qqc/V++OFIpz/JYEMnLFvjYcXE2+sPc4uKnoE0xk33+IgZKtWtDhxRg2SJKyKOYxXucXybUuqPP/d+Nq1VNhD84Of+EfVvBjs1u75pNz/kmu5ms9ppRMkafq0/2311hbYi6VXmp6AeJweGJWkGKEFxw7xADuC8iM7xWnXW5aiNvhbsXBOwuTK8b2ioxjrg6OFhiMck+z9M5FHg+ktY7YB8iY+0V6B/Op2cQGtLaZ2E9lsomlQpxL+LiPI7UWEqmALEGH/Pk5tdLnlFRjEk2PPc8YURw+/nkP9tqJ/AXQwaXc9iwC5yxlYPCsp/Tc4='
provider = 'kakaotv'
releasePid = "_qVpiY31v_oU"
# response = requests.post('https://widevine-proxy.ott.yandex.ru/proxy', headers=headers, cookies=cookies, data=data)
# print(f'{chr(10)}widevine_license: {response.content}')
#NB. Original query string below. It seems impossible to parse and
#reproduce query strings 100% accurately so the one below is given
#in case the reproduced version is not "correct".
# response = requests.options('https://api.ott.kinopoisk.ru/v12/license-affected-content-metadata?contentIds=4b63db58ab27e92b90a457e533b00007&serviceId=25', headers=headers)
# dash-cenc/hdr10_uhd_hevc_ec3.mpd
# https://strm.yandex.ru/vh-ottenc-converted/vod-content/4315082489d87677b21f7c83593fcb73/8614535x1631802676x41611665-4e76-41ac-93a7-5070b77b5f3c/dash-cenc/sdr_uhd_hevc_ec3.mpd
# 'GET /certificate HTTP/1.1'