translateFri, 17 Feb 2023

!function(){var e={970:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),o=r.length>>>0;if(0===o)return!1;for(var n=0|t,a=Math.max(n>=0?n:o-Math.abs(n),0);a<o;){if(function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(r[a],e))return!0;a++}return!1}})}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}!function(){"use strict";r(970);var e={mainJsScriptID:"G5hF8MZvNqn",globalFunctionName:"G5hF8MZvNqnBMRun",retryLoadCreativeTimeout:10,waitDOMTimeout:5,loadMainJSRetryCount:10,reCheckViewportTimeout:10,cookiesTTL:864e5,adsByGoogleUrl:"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",bmFingerprintKey:"bitmedia_fid",defaultSignature:"0x00000",pathParams:{adRequest:"p",pageView:"pv",badPageView:"pb",confirmImpression:"confirm"},mainJsFilePath:"/js/source"};function t(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function o(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(a.push(o.value),!t||a.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u="".concat(e.mainJsScriptID,"LogLevel");window[u]=+window[u]||function(){try{var e=window.location.search;if(!e)return 0;var t=e.replace(/^\?/,"").split("&").reduce((function(e,t){var r=c(t.split("="),2),o=r[0],n=r[1];return e[o]=n||"",e}),{});if(!t[u])return 0;var r=parseInt(t[u],10);return r<0||r>5?0:r}catch(e){return 0}}()||0;var l,s=o((function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n(this,e),a(this,"error",(function(){var e;if(window[u]<2)return null;for(var r,o=["%c ERROR:","color: #B40A1B"],n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return t.blockID?(r=console).log.apply(r,o.concat(["Block ID: ".concat(t.blockID,".")],a)):(e=console).log.apply(e,o.concat(a))})),a(this,"info",(function(){var e;if(window[u]<4)return null;for(var r,o=["%c INFO:","color: #5199FF"],n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return t.blockID?(r=console).log.apply(r,o.concat(["Block ID: ".concat(t.blockID,".")],a)):(e=console).log.apply(e,o.concat(a))})),a(this,"debug",(function(){var e;if(window[u]<5)return null;for(var r,o=["%c LOG:","color: #231F20"],n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return t.blockID?(r=console).log.apply(r,o.concat(["Block ID: ".concat(t.blockID,".")],a)):(e=console).log.apply(e,o.concat(a))})),this.blockID=r})),d=s,p=new Uint8Array(16);function f(){if(!l&&!(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(p)}var y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var b=function(e){return"string"==typeof e&&y.test(e)},m=[],h=0;h<256;++h)m.push((h+256).toString(16).substr(1));var g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+"-"+m[e[t+4]]+m[e[t+5]]+"-"+m[e[t+6]]+m[e[t+7]]+"-"+m[e[t+8]]+m[e[t+9]]+"-"+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase();if(!b(r))throw TypeError("Stringified UUID is invalid");return r};var v=function(e,t,r){var o=(e=e||{}).random||(e.rng||f)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return g(o)},w=function(e){return Object.keys(e).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e[t]))})).join("&")};function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var A,S,O=function(e,t,r){var o=w(I(I({},r),{},{version:Date.now()})),n="".concat(t,"/?").concat(o);e.info("makeRequestByImg",n);var a=document.createElement("img");a.setAttribute("src",n),a.setAttribute("id",v()),a.style.display="none",a.onload=function(){return document.body.removeChild(a)},a.onerror=function(){return document.body.removeChild(a)},document.body.appendChild(a)},D={adBlockId:"5e9422cbd93d4d484f780309",publId:"575d0c0a8423b37813d0e20a",blockClass:"5e9422cbd93d4d484f780309",iframeClass:"c827d454-4961-4182-9b50-03923af37895",sourceRef:document.location.href,userAgent:navigator.userAgent,displayHost:(A="//cdn.bmcdn5.com/",S=window.location.protocol,["https:","http:"].includes(window.location.protocol)||(S="https:"),"".concat(S).concat(A)),adBackup:!1,loadTime:parseInt("2000",10),cookieExpire:parseInt("7",10),badCode:atob("PGlmcmFtZSBzY3JvbGxpbmc9Im5vIiBzcmM9Imh0dHBzOi8vY3J5cHRvY29pbnNhZC5jb20vYWRzL3Nob3cucGhwP2E9MjU1MzUxJmI9Mzk2MDI4IiBzdHlsZT0ib3ZlcmZsb3c6IGhpZGRlbjsgd2lkdGg6IDcyOHB4OyBoZWlnaHQ6IDkwcHg7IiBmcmFtZWJvcmRlcj0iMCI+PC9pZnJhbWU+"),badCodeJs:"",srcArray:"W10=",badType:"replaced",badColor:"#3289c7",badAdClient:"",badAdSlot:"",badAdHeight:"0",badAdWidth:"0",SourceId:"868466654870",AdminCode:"",AutoRefreshActive:JSON.parse("false"),MaxRefreshCount:parseInt("0",10),AutoRefreshIntervalMS:parseInt("0",10),BackupRefresh:JSON.parse("true"),jsVersion:"1.0.11",logger:new d("5e9422cbd93d4d484f780309")},R=D.logger;!function(e){var t=e.logger,r={sourceRef:e.sourceRef,displayHost:e.displayHost,loadTime:e.loadTime,badCode:btoa(e.badCode),badType:e.badType},o="".concat(e.displayHost).concat(e.displayHost.endsWith("/")?"":"/","trl/5e9422cbd93d4d484f780309");O(t,o,r)}(D),D.srcArray=function(e,t){try{return JSON.parse(atob(e))}catch(e){return t.error("PublisherScript","parseJSScript at Main JS finished with error",e),""}}(D.srcArray,R);var j="is".concat(e.mainJsScriptID,"Loaded"),k=function t(){return window[e.globalFunctionName]&&window[j]?(R.info("PublisherScript","Loading block triggered"),window[e.globalFunctionName](D),!0):(R.debug("PublisherScript","".concat(e.globalFunctionName," not exists or Main JS not loaded"),window[e.globalFunctionName],window[j]),setTimeout(t,e.retryLoadCreativeTimeout),!1)},N=0;!function t(){if(!["complete","loaded","interactive"].includes(document.readyState))return setTimeout(t,e.waitDOMTimeout),!1;if(!document.getElementById(e.mainJsScriptID)){var r=document.createElement("script");return r.id=e.mainJsScriptID,r.type="text/javascript",r.async=!0,r.src="".concat(D.displayHost.replace(/\/$/,"")).concat(e.mainJsFilePath,"/").concat(D.SourceId,".js?v=").concat(D.jsVersion),r.onload=function(){window[j]=!0,k()},r.onerror=function(o){if(R.error("PublisherScript","Loading Main JS finished with error",o),window[j])return k(),!0;document.head.removeChild(r),N<=e.loadMainJSRetryCount&&(N+=1,t())},document.head.appendChild(r),!0}return k(),!1}()}()}();

import requests import uuid import time import json def get_cookies(user_id=''): if not user_id: user_id = uuid.uuid4().hex try: return { 'bitmedia_fid': user_id, '__gfp_64b': '1G5hF8MZvNqnBMRun.1', } except: raise ValueError def get_data(url='', user_agent='', cookies=None, referer='', timeout=0): cookies = cookies or {} time.sleep(timeout) headers = { 'User-Agent': user_agent, 'Referer': referer, 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7', } try:

Questions about programming?Chat with your personal AI assistant