抖音-获取用户作品-a_bogus逆向
作者声明:文章仅供学习交流与参考!严禁用于任何商业与非法用途!否则由此产生的一切后果均与作者无关!如有侵权,请联系作者本人进行删除!
定位
接口为/aweme/v1/web/aweme/post/
- 先定位a_bogus位置,如图位置,和前几个版本一样
![image]()
采用补环境的方式, 先获取生成位置所在的文件(bdms_....js)作为src.js文件,在a_bogus生成位置添加判断,将a_bogus值赋值给全局变量window,用于导出

此src为jsvmp,找寻数据输入位置, 经过分析,得知是上一个栈通过xhr导入, jsvmp中xhr触发获取其中的值进行数据生成,需要获取由xhr导入的数据, 我们可以手动构建xhr,导入需要的数据,然后触发,来向jsvmp中传输数据
e={}
xhr = new XMLHttpRequest();
Object.assign(xhr, e)
xhr.send(null);
这个数据一般有一下特征:
- 有_tnc_original_url名称的key
- _tnc_original_url必须是/aweme/post/
- 有bdmsInvokeList名称的key
代码
- 代码
- 此文件包含 环境代码+src文件导入+a_bogus获取函数, 在py代码中直接引用,调用a_bogus获取函数
// 补环境框架
// 一、工具/插件函数
!(() => {
const origin_log = console.log;
;
// const origin_log = function () {};
logToConsole = function () {
return origin_log(...arguments)
// return
}
})();
watch = function (obj, name) {
// 格式化值(超长自动截断)
const formatValue = (val) => {
// if (val === null) return val;
// if (val === undefined) return val;
if (typeof val === 'string') {
debugger;
return val.length > 60 ? val.substring(0, 50) + '...(长度:' + val.length + ')' : `"${val}"`;
}
// if (typeof val === 'number' || typeof val === 'boolean') return val;
// if (typeof val === 'function') return `[Function ${val.name || ''}]`;
// // if (typeof val === 'function') return `${val}`;
// if (Array.isArray(val)) return `[Array(${val.length})]`;
// if (val instanceof Uint8Array || val instanceof ArrayBuffer) {
// return `[${val.constructor.name}(${val.byteLength || val.length})]`;
// }
// if (typeof val === 'object') return `[${val.constructor.name || 'Object'}]`;
// return String(val);
return val;
};
return new Proxy(obj, {
get(target, p, receiver) {
// 过滤没用的信息,不进行打印
if (name)
if (p === "Math" || p === "Symbol" || p === "Proxy" || p === "Promise" || p === "Array" || p === "isNaN" || p === "encodeURI" || p === "Uint8Array" || p.toString().indexOf("Symbol(") != -1 || p === "_element") {
var val = Reflect.get(...arguments);
return val
} else {
var val = Reflect.get(...arguments);
const lst = []
for (let i = 0; i < p.length; i++) {
lst.push(p.charCodeAt(i))
}
if (typeof val === 'function') {
logToConsole(`取值: ${name}.${p} => function`);
} else {
logToConsole(`取值: ${name}.${p} =>`, formatValue(val));
}
return val
}
},
set(target, p, value, receiver) {
var val = Reflect.set(...arguments)
if (typeof value === 'function') {
logToConsole(`设置值:${name}.${p}=>function `,);
} else {
logToConsole(`设置值:${name}.${p}=> `, formatValue(value));
if (name === '环境数组' && p === '4') {
debugger
}
}
return val
},
has(target, key) {
logToConsole(`检查属性存在性: ${name}.${key.toString()}`);
return key in target;
},
ownKeys(target) {
logToConsole(`ownKeys检测: ${name}`);
if (name === 'span_domtokenlist') {
debugger
}
if (name === 'window') {
const keys = [
"Object",
"Function",
"Array",
"Number",
"parseFloat",
"parseInt",
"Infinity",
"NaN",
"undefined",
"Boolean",
"String",
"Symbol",
"Date",
"Promise",
"RegExp",
"Error",
"AggregateError",
"EvalError",
"RangeError",
"ReferenceError",
"SyntaxError",
"TypeError",
"URIError",
"globalThis",
"JSON",
"Math",
"Intl",
"ArrayBuffer",
"Atomics",
"Uint8Array",
"Int8Array",
"Uint16Array",
"Int16Array",
"Uint32Array",
"Int32Array",
"BigUint64Array",
"BigInt64Array",
"Uint8ClampedArray",
"Float32Array",
"Float64Array",
"DataView",
"Map",
"BigInt",
"Set",
"WeakMap",
"WeakSet",
"Proxy",
"Reflect",
"FinalizationRegistry",
"WeakRef",
"decodeURI",
"decodeURIComponent",
"encodeURI",
"encodeURIComponent",
"escape",
"unescape",
"eval",
"isFinite",
"isNaN",
"console",
"Option",
"Image",
"Audio",
"webkitURL",
"webkitRTCPeerConnection",
"webkitMediaStream",
"WebKitMutationObserver",
"WebKitCSSMatrix",
"XSLTProcessor",
"XPathResult",
"XPathExpression",
"XPathEvaluator",
"XMLSerializer",
"XMLHttpRequestUpload",
"XMLHttpRequestEventTarget",
"XMLHttpRequest",
"XMLDocument",
"WritableStreamDefaultWriter",
"WritableStreamDefaultController",
"WritableStream",
"Worker",
"WindowControlsOverlayGeometryChangeEvent",
"WindowControlsOverlay",
"Window",
"WheelEvent",
"WebSocket",
"WebGLVertexArrayObject",
"WebGLUniformLocation",
"WebGLTransformFeedback",
"WebGLTexture",
"WebGLSync",
"WebGLShaderPrecisionFormat",
"WebGLShader",
"WebGLSampler",
"WebGLRenderingContext",
"WebGLRenderbuffer",
"WebGLQuery",
"WebGLProgram",
"WebGLObject",
"WebGLFramebuffer",
"WebGLContextEvent",
"WebGLBuffer",
"WebGLActiveInfo",
"WebGL2RenderingContext",
"WaveShaperNode",
"VisualViewport",
"VisibilityStateEntry",
"VirtualKeyboardGeometryChangeEvent",
"ViewTransitionTypeSet",
"ViewTransition",
"ViewTimeline",
"VideoPlaybackQuality",
"VideoFrame",
"VideoColorSpace",
"ValidityState",
"VTTCue",
"UserActivation",
"URLSearchParams",
"URLPattern",
"URL",
"UIEvent",
"TrustedTypePolicyFactory",
"TrustedTypePolicy",
"TrustedScriptURL",
"TrustedScript",
"TrustedHTML",
"TreeWalker",
"TransitionEvent",
"TransformStreamDefaultController",
"TransformStream",
"TrackEvent",
"TouchList",
"TouchEvent",
"Touch",
"ToggleEvent",
"TimeRanges",
"TextUpdateEvent",
"TextTrackList",
"TextTrackCueList",
"TextTrackCue",
"TextTrack",
"TextMetrics",
"TextFormatUpdateEvent",
"TextFormat",
"TextEvent",
"TextEncoderStream",
"TextEncoder",
"TextDecoderStream",
"TextDecoder",
"Text",
"TaskSignal",
"TaskPriorityChangeEvent",
"TaskController",
"TaskAttributionTiming",
"SyncManager",
"SubmitEvent",
"StyleSheetList",
"StyleSheet",
"StylePropertyMapReadOnly",
"StylePropertyMap",
"StorageEvent",
"Storage",
"StereoPannerNode",
"StaticRange",
"SourceBufferList",
"SourceBuffer",
"ShadowRoot",
"Selection",
"SecurityPolicyViolationEvent",
"ScrollTimeline",
"ScriptProcessorNode",
"ScreenOrientation",
"Screen",
"Scheduling",
"Scheduler",
"SVGViewElement",
"SVGUseElement",
"SVGUnitTypes",
"SVGTransformList",
"SVGTransform",
"SVGTitleElement",
"SVGTextPositioningElement",
"SVGTextPathElement",
"SVGTextElement",
"SVGTextContentElement",
"SVGTSpanElement",
"SVGSymbolElement",
"SVGSwitchElement",
"SVGStyleElement",
"SVGStringList",
"SVGStopElement",
"SVGSetElement",
"SVGScriptElement",
"SVGSVGElement",
"SVGRectElement",
"SVGRect",
"SVGRadialGradientElement",
"SVGPreserveAspectRatio",
"SVGPolylineElement",
"SVGPolygonElement",
"SVGPointList",
"SVGPoint",
"SVGPatternElement",
"SVGPathElement",
"SVGNumberList",
"SVGNumber",
"SVGMetadataElement",
"SVGMatrix",
"SVGMaskElement",
"SVGMarkerElement",
"SVGMPathElement",
"SVGLinearGradientElement",
"SVGLineElement",
"SVGLengthList",
"SVGLength",
"SVGImageElement",
"SVGGraphicsElement",
"SVGGradientElement",
"SVGGeometryElement",
"SVGGElement",
"SVGForeignObjectElement",
"SVGFilterElement",
"SVGFETurbulenceElement",
"SVGFETileElement",
"SVGFESpotLightElement",
"SVGFESpecularLightingElement",
"SVGFEPointLightElement",
"SVGFEOffsetElement",
"SVGFEMorphologyElement",
"SVGFEMergeNodeElement",
"SVGFEMergeElement",
"SVGFEImageElement",
"SVGFEGaussianBlurElement",
"SVGFEFuncRElement",
"SVGFEFuncGElement",
"SVGFEFuncBElement",
"SVGFEFuncAElement",
"SVGFEFloodElement",
"SVGFEDropShadowElement",
"SVGFEDistantLightElement",
"SVGFEDisplacementMapElement",
"SVGFEDiffuseLightingElement",
"SVGFEConvolveMatrixElement",
"SVGFECompositeElement",
"SVGFEComponentTransferElement",
"SVGFEColorMatrixElement",
"SVGFEBlendElement",
"SVGEllipseElement",
"SVGElement",
"SVGDescElement",
"SVGDefsElement",
"SVGComponentTransferFunctionElement",
"SVGClipPathElement",
"SVGCircleElement",
"SVGAnimationElement",
"SVGAnimatedTransformList",
"SVGAnimatedString",
"SVGAnimatedRect",
"SVGAnimatedPreserveAspectRatio",
"SVGAnimatedNumberList",
"SVGAnimatedNumber",
"SVGAnimatedLengthList",
"SVGAnimatedLength",
"SVGAnimatedInteger",
"SVGAnimatedEnumeration",
"SVGAnimatedBoolean",
"SVGAnimatedAngle",
"SVGAnimateTransformElement",
"SVGAnimateMotionElement",
"SVGAnimateElement",
"SVGAngle",
"SVGAElement",
"Response",
"ResizeObserverSize",
"ResizeObserverEntry",
"ResizeObserver",
"Request",
"ReportingObserver",
"ReportBody",
"ReadableStreamDefaultReader",
"ReadableStreamDefaultController",
"ReadableStreamBYOBRequest",
"ReadableStreamBYOBReader",
"ReadableStream",
"ReadableByteStreamController",
"Range",
"RadioNodeList",
"RTCTrackEvent",
"RTCStatsReport",
"RTCSessionDescription",
"RTCSctpTransport",
"RTCRtpTransceiver",
"RTCRtpSender",
"RTCRtpReceiver",
"RTCPeerConnectionIceEvent",
"RTCPeerConnectionIceErrorEvent",
"RTCPeerConnection",
"RTCIceTransport",
"RTCIceCandidate",
"RTCErrorEvent",
"RTCError",
"RTCEncodedVideoFrame",
"RTCEncodedAudioFrame",
"RTCDtlsTransport",
"RTCDataChannelEvent",
"RTCDTMFToneChangeEvent",
"RTCDTMFSender",
"RTCCertificate",
"PromiseRejectionEvent",
"ProgressEvent",
"Profiler",
"ProcessingInstruction",
"PopStateEvent",
"PointerEvent",
"PluginArray",
"Plugin",
"PictureInPictureWindow",
"PictureInPictureEvent",
"PeriodicWave",
"PerformanceTiming",
"PerformanceServerTiming",
"PerformanceScriptTiming",
"PerformanceResourceTiming",
"PerformancePaintTiming",
"PerformanceObserverEntryList",
"PerformanceObserver",
"PerformanceNavigationTiming",
"PerformanceNavigation",
"PerformanceMeasure",
"PerformanceMark",
"PerformanceLongTaskTiming",
"PerformanceLongAnimationFrameTiming",
"PerformanceEventTiming",
"PerformanceEntry",
"PerformanceElementTiming",
"Performance",
"Path2D",
"PannerNode",
"PageTransitionEvent",
"OverconstrainedError",
"OscillatorNode",
"OffscreenCanvasRenderingContext2D",
"OffscreenCanvas",
"OfflineAudioContext",
"OfflineAudioCompletionEvent",
"NodeList",
"NodeIterator",
"NodeFilter",
"Node",
"NetworkInformation",
"NavigatorUAData",
"Navigator",
"NavigationTransition",
"NavigationHistoryEntry",
"NavigationDestination",
"NavigationCurrentEntryChangeEvent",
"Navigation",
"NavigateEvent",
"NamedNodeMap",
"MutationRecord",
"MutationObserver",
"MouseEvent",
"MimeTypeArray",
"MimeType",
"MessagePort",
"MessageEvent",
"MessageChannel",
"MediaStreamTrackVideoStats",
"MediaStreamTrackProcessor",
"MediaStreamTrackGenerator",
"MediaStreamTrackEvent",
"MediaStreamTrackAudioStats",
"MediaStreamTrack",
"MediaStreamEvent",
"MediaStreamAudioSourceNode",
"MediaStreamAudioDestinationNode",
"MediaStream",
"MediaSourceHandle",
"MediaSource",
"MediaRecorder",
"MediaQueryListEvent",
"MediaQueryList",
"MediaList",
"MediaError",
"MediaEncryptedEvent",
"MediaElementAudioSourceNode",
"MediaCapabilities",
"MathMLElement",
"Location",
"LayoutShiftAttribution",
"LayoutShift",
"LargestContentfulPaint",
"KeyframeEffect",
"KeyboardEvent",
"IntersectionObserverEntry",
"IntersectionObserver",
"InputEvent",
"InputDeviceInfo",
"InputDeviceCapabilities",
"Ink",
"ImageData",
"ImageCapture",
"ImageBitmapRenderingContext",
"ImageBitmap",
"IdleDeadline",
"IIRFilterNode",
"IDBVersionChangeEvent",
"IDBTransaction",
"IDBRequest",
"IDBOpenDBRequest",
"IDBObjectStore",
"IDBKeyRange",
"IDBIndex",
"IDBFactory",
"IDBDatabase",
"IDBCursorWithValue",
"IDBCursor",
"History",
"HighlightRegistry",
"Highlight",
"Headers",
"HashChangeEvent",
"HTMLVideoElement",
"HTMLUnknownElement",
"HTMLUListElement",
"HTMLTrackElement",
"HTMLTitleElement",
"HTMLTimeElement",
"HTMLTextAreaElement",
"HTMLTemplateElement",
"HTMLTableSectionElement",
"HTMLTableRowElement",
"HTMLTableElement",
"HTMLTableColElement",
"HTMLTableCellElement",
"HTMLTableCaptionElement",
"HTMLStyleElement",
"HTMLSpanElement",
"HTMLSourceElement",
"HTMLSlotElement",
"HTMLSelectElement",
"HTMLScriptElement",
"HTMLQuoteElement",
"HTMLProgressElement",
"HTMLPreElement",
"HTMLPictureElement",
"HTMLParamElement",
"HTMLParagraphElement",
"HTMLOutputElement",
"HTMLOptionsCollection",
"HTMLOptionElement",
"HTMLOptGroupElement",
"HTMLObjectElement",
"HTMLOListElement",
"HTMLModElement",
"HTMLMeterElement",
"HTMLMetaElement",
"HTMLMenuElement",
"HTMLMediaElement",
"HTMLMarqueeElement",
"HTMLMapElement",
"HTMLLinkElement",
"HTMLLegendElement",
"HTMLLabelElement",
"HTMLLIElement",
"HTMLInputElement",
"HTMLImageElement",
"HTMLIFrameElement",
"HTMLHtmlElement",
"HTMLHeadingElement",
"HTMLHeadElement",
"HTMLHRElement",
"HTMLFrameSetElement",
"HTMLFrameElement",
"HTMLFormElement",
"HTMLFormControlsCollection",
"HTMLFontElement",
"HTMLFieldSetElement",
"HTMLEmbedElement",
"HTMLElement",
"HTMLDocument",
"HTMLDivElement",
"HTMLDirectoryElement",
"HTMLDialogElement",
"HTMLDetailsElement",
"HTMLDataListElement",
"HTMLDataElement",
"HTMLDListElement",
"HTMLCollection",
"HTMLCanvasElement",
"HTMLButtonElement",
"HTMLBodyElement",
"HTMLBaseElement",
"HTMLBRElement",
"HTMLAudioElement",
"HTMLAreaElement",
"HTMLAnchorElement",
"HTMLAllCollection",
"GeolocationPositionError",
"GeolocationPosition",
"GeolocationCoordinates",
"Geolocation",
"GamepadHapticActuator",
"GamepadEvent",
"GamepadButton",
"Gamepad",
"GainNode",
"FormDataEvent",
"FormData",
"FontFaceSetLoadEvent",
"FontFace",
"FocusEvent",
"FileReader",
"FileList",
"File",
"FeaturePolicy",
"External",
"EventTarget",
"EventSource",
"EventCounts",
"Event",
"ErrorEvent",
"EncodedVideoChunk",
"EncodedAudioChunk",
"ElementInternals",
"Element",
"EditContext",
"DynamicsCompressorNode",
"DragEvent",
"DocumentType",
"DocumentTimeline",
"DocumentFragment",
"Document",
"DelegatedInkTrailPresenter",
"DelayNode",
"DecompressionStream",
"DataTransferItemList",
"DataTransferItem",
"DataTransfer",
"DOMTokenList",
"DOMStringMap",
"DOMStringList",
"DOMRectReadOnly",
"DOMRectList",
"DOMRect",
"DOMQuad",
"DOMPointReadOnly",
"DOMPoint",
"DOMParser",
"DOMMatrixReadOnly",
"DOMMatrix",
"DOMImplementation",
"DOMException",
"DOMError",
"CustomStateSet",
"CustomEvent",
"CustomElementRegistry",
"Crypto",
"CountQueuingStrategy",
"ConvolverNode",
"ContentVisibilityAutoStateChangeEvent",
"ConstantSourceNode",
"CompressionStream",
"CompositionEvent",
"Comment",
"CloseWatcher",
"CloseEvent",
"ClipboardEvent",
"CharacterData",
"CharacterBoundsUpdateEvent",
"ChannelSplitterNode",
"ChannelMergerNode",
"CanvasRenderingContext2D",
"CanvasPattern",
"CanvasGradient",
"CanvasCaptureMediaStreamTrack",
"CSSVariableReferenceValue",
"CSSUnparsedValue",
"CSSUnitValue",
"CSSTranslate",
"CSSTransition",
"CSSTransformValue",
"CSSTransformComponent",
"CSSSupportsRule",
"CSSStyleValue",
"CSSStyleSheet",
"CSSStyleRule",
"CSSStyleDeclaration",
"CSSStartingStyleRule",
"CSSSkewY",
"CSSSkewX",
"CSSSkew",
"CSSScopeRule",
"CSSScale",
"CSSRuleList",
"CSSRule",
"CSSRotate",
"CSSPropertyRule",
"CSSPositionValue",
"CSSPositionTryRule",
"CSSPositionTryDescriptors",
"CSSPerspective",
"CSSPageRule",
"CSSNumericValue",
"CSSNumericArray",
"CSSNestedDeclarations",
"CSSNamespaceRule",
"CSSMediaRule",
"CSSMatrixComponent",
"CSSMathValue",
"CSSMathSum",
"CSSMathProduct",
"CSSMathNegate",
"CSSMathMin",
"CSSMathMax",
"CSSMathInvert",
"CSSMathClamp",
"CSSLayerStatementRule",
"CSSLayerBlockRule",
"CSSKeywordValue",
"CSSKeyframesRule",
"CSSKeyframeRule",
"CSSImportRule",
"CSSImageValue",
"CSSGroupingRule",
"CSSFontPaletteValuesRule",
"CSSFontFaceRule",
"CSSCounterStyleRule",
"CSSContainerRule",
"CSSConditionRule",
"CSSAnimation",
"CSS",
"CSPViolationReportBody",
"CDATASection",
"ByteLengthQueuingStrategy",
"BrowserCaptureMediaStreamTrack",
"BroadcastChannel",
"BlobEvent",
"Blob",
"BiquadFilterNode",
"BeforeUnloadEvent",
"BeforeInstallPromptEvent",
"BaseAudioContext",
"BarProp",
"AudioWorkletNode",
"AudioSinkInfo",
"AudioScheduledSourceNode",
"AudioProcessingEvent",
"AudioParamMap",
"AudioParam",
"AudioNode",
"AudioListener",
"AudioDestinationNode",
"AudioData",
"AudioContext",
"AudioBufferSourceNode",
"AudioBuffer",
"Attr",
"AnimationTimeline",
"AnimationPlaybackEvent",
"AnimationEvent",
"AnimationEffect",
"Animation",
"AnalyserNode",
"AbstractRange",
"AbortSignal",
"AbortController",
"window",
"self",
"document",
"name",
"location",
"customElements",
"history",
"navigation",
"locationbar",
"menubar",
"personalbar",
"scrollbars",
"statusbar",
"toolbar",
"status",
"closed",
"frames",
"length",
"top",
"opener",
"parent",
"frameElement",
"navigator",
"origin",
"external",
"screen",
"innerWidth",
"innerHeight",
"scrollX",
"pageXOffset",
"scrollY",
"pageYOffset",
"visualViewport",
"screenX",
"screenY",
"outerWidth",
"outerHeight",
"devicePixelRatio",
"event",
"clientInformation",
"offscreenBuffering",
"screenLeft",
"screenTop",
"styleMedia",
"onsearch",
"trustedTypes",
"performance",
"onappinstalled",
"onbeforeinstallprompt",
"crypto",
"indexedDB",
"sessionStorage",
"localStorage",
"onbeforexrselect",
"onabort",
"onbeforeinput",
"onbeforematch",
"onbeforetoggle",
"onblur",
"oncancel",
"oncanplay",
"oncanplaythrough",
"onchange",
"onclick",
"onclose",
"oncontentvisibilityautostatechange",
"oncontextlost",
"oncontextmenu",
"oncontextrestored",
"oncuechange",
"ondblclick",
"ondrag",
"ondragend",
"ondragenter",
"ondragleave",
"ondragover",
"ondragstart",
"ondrop",
"ondurationchange",
"onemptied",
"onended",
"onerror",
"onfocus",
"onformdata",
"oninput",
"oninvalid",
"onkeydown",
"onkeypress",
"onkeyup",
"onload",
"onloadeddata",
"onloadedmetadata",
"onloadstart",
"onmousedown",
"onmouseenter",
"onmouseleave",
"onmousemove",
"onmouseout",
"onmouseover",
"onmouseup",
"onmousewheel",
"onpause",
"onplay",
"onplaying",
"onprogress",
"onratechange",
"onreset",
"onresize",
"onscroll",
"onsecuritypolicyviolation",
"onseeked",
"onseeking",
"onselect",
"onslotchange",
"onstalled",
"onsubmit",
"onsuspend",
"ontimeupdate",
"ontoggle",
"onvolumechange",
"onwaiting",
"onwebkitanimationend",
"onwebkitanimationiteration",
"onwebkitanimationstart",
"onwebkittransitionend",
"onwheel",
"onauxclick",
"ongotpointercapture",
"onlostpointercapture",
"onpointerdown",
"onpointermove",
"onpointerrawupdate",
"onpointerup",
"onpointercancel",
"onpointerover",
"onpointerout",
"onpointerenter",
"onpointerleave",
"onselectstart",
"onselectionchange",
"onanimationend",
"onanimationiteration",
"onanimationstart",
"ontransitionrun",
"ontransitionstart",
"ontransitionend",
"ontransitioncancel",
"onafterprint",
"onbeforeprint",
"onbeforeunload",
"onhashchange",
"onlanguagechange",
"onmessage",
"onmessageerror",
"onoffline",
"ononline",
"onpagehide",
"onpageshow",
"onpopstate",
"onrejectionhandled",
"onstorage",
"onunhandledrejection",
"onunload",
"isSecureContext",
"crossOriginIsolated",
"scheduler",
"alert",
"atob",
"blur",
"btoa",
"cancelAnimationFrame",
"cancelIdleCallback",
"captureEvents",
"clearInterval",
"clearTimeout",
"close",
"confirm",
"createImageBitmap",
"fetch",
"find",
"focus",
"getComputedStyle",
"getSelection",
"matchMedia",
"moveBy",
"moveTo",
"open",
"postMessage",
"print",
"prompt",
"queueMicrotask",
"releaseEvents",
"reportError",
"requestAnimationFrame",
"requestIdleCallback",
"resizeBy",
"resizeTo",
"scroll",
"scrollBy",
"scrollTo",
"setInterval",
"setTimeout",
"stop",
"structuredClone",
"webkitCancelAnimationFrame",
"webkitRequestAnimationFrame",
"Iterator",
"chrome",
"WebAssembly",
"caches",
"cookieStore",
"ondevicemotion",
"ondeviceorientation",
"ondeviceorientationabsolute",
"launchQueue",
"sharedStorage",
"documentPictureInPicture",
"AICreateMonitor",
"AbsoluteOrientationSensor",
"Accelerometer",
"AudioDecoder",
"AudioEncoder",
"AudioWorklet",
"BatteryManager",
"Cache",
"CacheStorage",
"Clipboard",
"ClipboardItem",
"CookieChangeEvent",
"CookieStore",
"CookieStoreManager",
"Credential",
"CredentialsContainer",
"CryptoKey",
"DeviceMotionEvent",
"DeviceMotionEventAcceleration",
"DeviceMotionEventRotationRate",
"DeviceOrientationEvent",
"FederatedCredential",
"GPU",
"GPUAdapter",
"GPUAdapterInfo",
"GPUBindGroup",
"GPUBindGroupLayout",
"GPUBuffer",
"GPUBufferUsage",
"GPUCanvasContext",
"GPUColorWrite",
"GPUCommandBuffer",
"GPUCommandEncoder",
"GPUCompilationInfo",
"GPUCompilationMessage",
"GPUComputePassEncoder",
"GPUComputePipeline",
"GPUDevice",
"GPUDeviceLostInfo",
"GPUError",
"GPUExternalTexture",
"GPUInternalError",
"GPUMapMode",
"GPUOutOfMemoryError",
"GPUPipelineError",
"GPUPipelineLayout",
"GPUQuerySet",
"GPUQueue",
"GPURenderBundle",
"GPURenderBundleEncoder",
"GPURenderPassEncoder",
"GPURenderPipeline",
"GPUSampler",
"GPUShaderModule",
"GPUShaderStage",
"GPUSupportedFeatures",
"GPUSupportedLimits",
"GPUTexture",
"GPUTextureUsage",
"GPUTextureView",
"GPUUncapturedErrorEvent",
"GPUValidationError",
"GravitySensor",
"Gyroscope",
"IdleDetector",
"ImageDecoder",
"ImageTrack",
"ImageTrackList",
"Keyboard",
"KeyboardLayoutMap",
"LinearAccelerationSensor",
"MIDIAccess",
"MIDIConnectionEvent",
"MIDIInput",
"MIDIInputMap",
"MIDIMessageEvent",
"MIDIOutput",
"MIDIOutputMap",
"MIDIPort",
"MediaDeviceInfo",
"MediaDevices",
"MediaKeyMessageEvent",
"MediaKeySession",
"MediaKeyStatusMap",
"MediaKeySystemAccess",
"MediaKeys",
"NavigationPreloadManager",
"NavigatorManagedData",
"OrientationSensor",
"PasswordCredential",
"ProtectedAudience",
"RelativeOrientationSensor",
"ScreenDetailed",
"ScreenDetails",
"Sensor",
"SensorErrorEvent",
"ServiceWorker",
"ServiceWorkerContainer",
"ServiceWorkerRegistration",
"StorageManager",
"SubtleCrypto",
"VideoDecoder",
"VideoEncoder",
"VirtualKeyboard",
"WGSLLanguageFeatures",
"WebTransport",
"WebTransportBidirectionalStream",
"WebTransportDatagramDuplexStream",
"WebTransportError",
"Worklet",
"XRDOMOverlayState",
"XRLayer",
"XRWebGLBinding",
"AuthenticatorAssertionResponse",
"AuthenticatorAttestationResponse",
"AuthenticatorResponse",
"PublicKeyCredential",
"Bluetooth",
"BluetoothCharacteristicProperties",
"BluetoothDevice",
"BluetoothRemoteGATTCharacteristic",
"BluetoothRemoteGATTDescriptor",
"BluetoothRemoteGATTServer",
"BluetoothRemoteGATTService",
"CaptureController",
"DevicePosture",
"DocumentPictureInPicture",
"EyeDropper",
"FileSystemDirectoryHandle",
"FileSystemFileHandle",
"FileSystemHandle",
"FileSystemWritableFileStream",
"FileSystemObserver",
"FontData",
"FragmentDirective",
"HID",
"HIDConnectionEvent",
"HIDDevice",
"HIDInputReportEvent",
"IdentityCredential",
"IdentityProvider",
"IdentityCredentialError",
"LaunchParams",
"LaunchQueue",
"Lock",
"LockManager",
"NavigatorLogin",
"NotRestoredReasonDetails",
"NotRestoredReasons",
"OTPCredential",
"PaymentAddress",
"PaymentRequest",
"PaymentRequestUpdateEvent",
"PaymentResponse",
"PaymentManager",
"PaymentMethodChangeEvent",
"Presentation",
"PresentationAvailability",
"PresentationConnection",
"PresentationConnectionAvailableEvent",
"PresentationConnectionCloseEvent",
"PresentationConnectionList",
"PresentationReceiver",
"PresentationRequest",
"PressureObserver",
"PressureRecord",
"Serial",
"SerialPort",
"StorageBucket",
"StorageBucketManager",
"USB",
"USBAlternateInterface",
"USBConfiguration",
"USBConnectionEvent",
"USBDevice",
"USBEndpoint",
"USBInTransferResult",
"USBInterface",
"USBIsochronousInTransferPacket",
"USBIsochronousInTransferResult",
"USBIsochronousOutTransferPacket",
"USBIsochronousOutTransferResult",
"USBOutTransferResult",
"WakeLock",
"WakeLockSentinel",
"XRAnchor",
"XRAnchorSet",
"XRBoundedReferenceSpace",
"XRCPUDepthInformation",
"XRCamera",
"XRDepthInformation",
"XRFrame",
"XRHitTestResult",
"XRHitTestSource",
"XRInputSource",
"XRInputSourceArray",
"XRInputSourceEvent",
"XRInputSourcesChangeEvent",
"XRLightEstimate",
"XRLightProbe",
"XRPose",
"XRRay",
"XRReferenceSpace",
"XRReferenceSpaceEvent",
"XRRenderState",
"XRRigidTransform",
"XRSession",
"XRSessionEvent",
"XRSpace",
"XRSystem",
"XRTransientInputHitTestResult",
"XRTransientInputHitTestSource",
"XRView",
"XRViewerPose",
"XRViewport",
"XRWebGLDepthInformation",
"XRWebGLLayer",
"XRHand",
"XRJointPose",
"XRJointSpace",
"getScreenDetails",
"queryLocalFonts",
"showDirectoryPicker",
"showOpenFilePicker",
"showSaveFilePicker",
"originAgentCluster",
"onpageswap",
"onpagereveal",
"credentialless",
"fence",
"speechSynthesis",
"onscrollend",
"onscrollsnapchange",
"onscrollsnapchanging",
"BackgroundFetchManager",
"BackgroundFetchRecord",
"BackgroundFetchRegistration",
"BluetoothUUID",
"CSSMarginRule",
"CSSViewTransitionRule",
"CaretPosition",
"ChapterInformation",
"CropTarget",
"DocumentPictureInPictureEvent",
"Fence",
"FencedFrameConfig",
"HTMLFencedFrameElement",
"MediaMetadata",
"MediaSession",
"NavigationActivation",
"Notification",
"PageRevealEvent",
"PageSwapEvent",
"PeriodicSyncManager",
"PermissionStatus",
"Permissions",
"PushManager",
"PushSubscription",
"PushSubscriptionOptions",
"RTCDataChannel",
"RemotePlayback",
"RestrictionTarget",
"SharedStorage",
"SharedStorageWorklet",
"SharedWorker",
"SnapEvent",
"SpeechSynthesis",
"SpeechSynthesisErrorEvent",
"SpeechSynthesisEvent",
"SpeechSynthesisUtterance",
"SpeechSynthesisVoice",
"WebSocketError",
"WebSocketStream",
"webkitSpeechGrammar",
"webkitSpeechGrammarList",
"webkitSpeechRecognition",
"webkitSpeechRecognitionError",
"webkitSpeechRecognitionEvent",
"webkitRequestFileSystem",
"webkitResolveLocalFileSystemURL",
"PC_ITEM_CONFIG",
"dra",
"customPointEvent",
"_risk_xhr",
"__intercept__fetch__",
"atobFill",
"riskHandlerUtil",
"ParamsSign",
"__core-js_shared__",
"regeneratorRuntime",
"callbackName",
"ajaxCount",
"__JDWEBSIGNHELPER_$DATA__",
"PSign",
"SHA256",
"bp_bizid",
"_0x26e2b7",
"_riskFpMode",
"jdtRiskContext",
"collectConfig",
"jdtRiskUtil",
"jdtRiskEncryptUtil",
"JdtRiskFingerPrint",
"jdtRiskCookieManager",
"jdtLocalStorageManager",
"jdtRiskStorageManager",
"TDEnvCollector",
"__getTkResult",
"_0x37f5",
"__callbackWrapper",
"reportLog",
"_0x1d73",
"_globalState",
"getJsToken",
"getJdEid",
"pageConfig",
"is_sort_black_list",
"jump_mobile",
"apiHost",
"commonAppId",
"preloadArray",
"seajsConfig",
"login",
"regist",
"createCookie",
"readCookie",
"addToFavorite",
"TrimPath",
"$",
"jQuery",
"seajs",
"define",
"EventEmitterPcItem",
"itemEventBus",
"listenTabVisibileReport",
"totouchbate",
"hashTag",
"href",
"_0x3db2",
"_0x3575",
"ParamsSignMain"
]
if (!keys.includes('$jsDebugIsRegistered')) {
keys.push('$jsDebugIsRegistered');
}
return keys
}
if (name === 'document') {
return [
"location"
]
}
if (name === 'window' || name === 'document') debugger;
return Reflect.ownKeys(...arguments)
}
})
}
// (1) 安全函数实现
const safeFunction = (function () {
let initialized = false;
let myFunction_toString_symbol;
const set_native = function set_native(func, key, value) {
Object.defineProperty(func, key, {
"enumerable": false,
"configurable": true,
"writable": true,
"value": value
});
};
return function safeFunction(func) {
if (!initialized) {
Function.prototype.$call = Function.prototype.call;
const $toString = Function.toString;
myFunction_toString_symbol = Symbol('functionToString');
const myToString = function myToString() {
return typeof this === 'function' && this[myFunction_toString_symbol] || $toString.$call(this);
};
delete Function.prototype.toString;
set_native(Function.prototype, "toString", myToString);
set_native(Function.prototype.toString, myFunction_toString_symbol, "function toString() { [native code] }");
initialized = true;
}
// 避免重复添加
if (!func.hasOwnProperty(myFunction_toString_symbol)) {
set_native(func, myFunction_toString_symbol, `function ${func.name || ''}() { [native code] }`);
}
return func;
};
})();
// (2) 构造函数(类构造器)
const CONSTRUCTOR_TOKEN = "constructor_token";
function createConstructor(constructorName, enableStrictMode, propertiesList = [], prototypeMethods = {}, parentConstructorName = null) {
const instancesData = {};
// 创建有名称的构造函数
const constructorFunction = function (element, propertySetter, validationToken) {
// 验证逻辑
if (enableStrictMode && !(validationToken && validationToken === CONSTRUCTOR_TOKEN)) {
throw new Error("Illegal constructor");
}
if (parentConstructorName && window[parentConstructorName]) {
window[parentConstructorName].call(this, element, null, CONSTRUCTOR_TOKEN);
}
if (propertySetter && typeof propertySetter === "function") {
propertySetter(this);
}
const instanceProperties = element && typeof element === "object" ? {...element} : {};
this._element = Symbol('_element');
instancesData[this._element] = instanceProperties;
if (element && typeof element === "object") {
Object.keys(element).forEach(key => {
if (!this[key]) {
this[key] = element[key];
}
});
}
};
// 设置函数名
Object.defineProperty(constructorFunction, 'name', {
value: constructorName,
writable: false,
enumerable: false,
configurable: true
});
// 设置继承关系
if (parentConstructorName && window[parentConstructorName]) {
constructorFunction.prototype = Object.create(window[parentConstructorName].prototype);
constructorFunction.prototype.constructor = constructorFunction;
Object.setPrototypeOf(constructorFunction, window[parentConstructorName]);
}
// 设置toStringTag
Object.defineProperty(constructorFunction.prototype, Symbol.toStringTag, {
value: constructorName,
writable: false,
enumerable: false,
configurable: true
});
// 添加原型方法
Object.keys(prototypeMethods).forEach(methodName => {
constructorFunction.prototype[methodName] = prototypeMethods[methodName];
if (typeof constructorFunction.prototype[methodName] === "function") {
safeFunction(constructorFunction.prototype[methodName]);
}
});
// 保护构造函数
safeFunction(constructorFunction);
// 将构造函数挂载到全局对象
window[constructorName] = constructorFunction;
return constructorFunction;
}
// 环境代码
// window
window=globalThis;
createConstructor('EventTarget',true,[],{},{})
createConstructor('WindowProperties',true,[],{},'EventTarget')
createConstructor('Window',true,[],{},'WindowProperties')
Object.setPrototypeOf(window,Window.prototype)
XMLHttpRequest=function(){}
//document
createConstructor('Node',true,[],{},'EventTarget')
createConstructor('Document',true,[],{
createElement: function (tagName) {
logToConsole('createElement->',tagName);
if(tagName=='span'){
return watch({
classList:watch([],'classList'),
},'span')
}
return {};
},
createEvent: function (type) {
logToConsole('createEvent->',type);
return {};
}
},'Node')
createConstructor('HTMLDocument',true,[],{},'Document')
createConstructor('HTMLAllCollection',true,[],{},{})
createConstructor('Element',true,[],{},'Node')
createConstructor('HTMLElement',true,[],{},'Element')
createConstructor('HTMLHtmlElement',true,[],{},'HTMLElement')
//navigator
createConstructor('Navigator',true,[],{},'EventTarget')
navigator={
"pemrissions": {
"microphone": "granted"
},
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
}
//location
location={
"ancestorOrigins": {},
"href": "https://www.douyin.com/user/MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM?from_tab_name=main",
"origin": "https://www.douyin.com",
"protocol": "https:",
"host": "www.douyin.com",
"hostname": "www.douyin.com",
"port": "",
"pathname": "/user/MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM",
"search": "?from_tab_name=main",
"hash": ""
}
//screen
screen={
"width": 1920,
"height": 1080,
}
// 挂代理
window=watch(window,'window')
document=watch(new HTMLDocument({
all:watch(new HTMLAllCollection(null,null,CONSTRUCTOR_TOKEN),'all'),
documentElement:watch(new HTMLHtmlElement(null,null,CONSTRUCTOR_TOKEN),'documentElement'),
},null,CONSTRUCTOR_TOKEN),'document')
navigator=watch(navigator,'navigator')
location=watch(location,'location')
screen=watch(screen,'screen')
//
require('./src')
function get_a_bogus(url) {
// 在jsvmp执行前的栈,找xhr传入参数
// 需要替换 bdmsInvokeList 中的url
let e={
"invokeList": [
{
"name": "addEventListener",
"args": [
"load",
null
]
},
{
"name": "addEventListener",
"args": [
"error",
null
]
}
],
"secureOpenArgs": {
"0": "GET",
"1": "/aweme/v1/web/aweme/post/?device_platform=webapp&aid=6383&channel=channel_pc_web&sec_user_id=MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM&max_cursor=1758711687000&locate_query=false&show_live_replay_strategy=1&need_time_list=0&time_list_query=0&whale_cut_token=&cut_version=1&count=18&publish_video_strategy_type=2&from_user_page=1&update_version_code=170400&pc_client_type=1&pc_libra_divert=Windows&support_h265=1&support_dash=1&cpu_core_num=16&version_code=290100&version_name=29.1.0&cookie_enabled=true&screen_width=1707&screen_height=960&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=148.0.0.0&browser_online=true&engine_name=Blink&engine_version=148.0.0.0&os_name=Windows&os_version=10&device_memory=32&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&webid=7645647355106297371&uifid=e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad",
"2": true
},
"ucProxyParam": {
"startTime": 1780540260065
},
"_tnc_original_url": "/aweme/v1/web/aweme/post/?device_platform=webapp&aid=6383&channel=channel_pc_web&sec_user_id=MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM&max_cursor=1758711687000&locate_query=false&show_live_replay_strategy=1&need_time_list=0&time_list_query=0&whale_cut_token=&cut_version=1&count=18&publish_video_strategy_type=2&from_user_page=1&update_version_code=170400&pc_client_type=1&pc_libra_divert=Windows&support_h265=1&support_dash=1&cpu_core_num=16&version_code=290100&version_name=29.1.0&cookie_enabled=true&screen_width=1707&screen_height=960&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=148.0.0.0&browser_online=true&engine_name=Blink&engine_version=148.0.0.0&os_name=Windows&os_version=10&device_memory=32&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&webid=7645647355106297371&uifid=e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad",
"_tnc_tncSchema": {
"md5_check": 0,
"ttnet_http_dns_timeout": 2,
"tnc_update_interval": 180,
"ttnet_enable_cronet_request_report": 1,
"wpad_enabled": 0,
"ttnet_http_dns_google": 0,
"ttnet_http_dns_enabled": 1,
"ttnet_http_dns_prefer": 1,
"send_tnc_host_arrays": [
"tnc0-aliec2.zijieapi.com",
"tnc0-alisc1.zijieapi.com"
],
"ttnet_url_dispatcher_enabled": 1,
"ttnet_request_retry_error_list": [
-21,
-109,
-126,
-324,
-101
],
"ttnet_request_retry_delay_interval_ms": 200,
"ttnet_h2_config": {
"h2_session_check_enabled": 1,
"h2_session_check_interval": 65,
"ping_keepalive_hosts": [],
"ping_keepalive_interval": 30,
"ping_probe_timeout": 5,
"session_check_hosts": []
},
"chromium_open": 1,
"ttnet_http_dns_addr": {
"tnc0-aliec2.zijieapi.com": "8.133.123.137,8.133.123.138,8.133.123.139,8.133.123.140",
"tnc0-alisc1.zijieapi.com": "47.106.88.76,47.106.84.116,120.78.234.27,120.78.189.22",
"tnc0-bjlgy.zijieapi.com": "8.133.123.137,8.133.123.138,8.133.123.139,8.133.123.140"
},
"ttnet_local_dns_time_out": 120,
"ttnet_h2_enabled": 1,
"ttnet_request_retry_max_attempts": 20,
"ttnet_dispatch_actions": [
{
"act_priority": 9000000,
"action": "dispatch",
"param": {
"service_name": "jump_east_path",
"dispatch_strategy": 0,
"host_group": [
"*"
],
"prefixes_group": [
"/aweme/v1/web/ad/report",
"/aweme/v1/web/fancy/qrcode/info",
"/aweme/v1/web/api/suggest_words/",
"/aweme/v1/web/seo/",
"/aweme/v1/web/series/detail/",
"/aweme/v1/web/series/list/",
"/aweme/v1/web/series/aweme/",
"/aweme/v1/web/content_pay/order/submit",
"/aweme/v1/web/series/watched/list/",
"/aweme/v1/web/series/card/feed/",
"/aweme/v1/web/series/watch/record/",
"/aweme/v1/web/user/paid_content/get/"
]
},
"rule_id": 350696,
"set_req_priority": 9000002,
"sign": "93fcfb3c45cac49e4612881eccb0601f"
}
],
"ttnet_dispatch_actions_epoch": -745022358
},
"_tnc_tncSchemaInfo": {
"aid": "-1",
"isCustomDefaultSchema": false,
"originalTncConfig": {
"aid": "6383",
"device_id": "7645647355106297371",
"user_id": "102773748241",
"region": "internal"
},
"requestQueryPayload": {
"tnc_js_sdk_version": "2.3.15.0",
"device_platform": "pc",
"aid": "6383",
"device_id": "7645647355106297371",
"user_id": "102773748241",
"web_service": ""
},
"requestHeaders": {},
"responseHeaders": {
"content-type": "application/json"
}
},
"_tnc_referrer_url": "https://www.douyin.com/user/MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM?from_tab_name=main",
"_tnc_url_process_result": [
{
"newUrl": "https://www.douyin.com/aweme/v1/web/aweme/post/?device_platform=webapp&aid=6383&channel=channel_pc_web&sec_user_id=MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM&max_cursor=1758711687000&locate_query=false&show_live_replay_strategy=1&need_time_list=0&time_list_query=0&whale_cut_token=&cut_version=1&count=18&publish_video_strategy_type=2&from_user_page=1&update_version_code=170400&pc_client_type=1&pc_libra_divert=Windows&support_h265=1&support_dash=1&cpu_core_num=16&version_code=290100&version_name=29.1.0&cookie_enabled=true&screen_width=1707&screen_height=960&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=148.0.0.0&browser_online=true&engine_name=Blink&engine_version=148.0.0.0&os_name=Windows&os_version=10&device_memory=32&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&webid=7645647355106297371&uifid=e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad",
"processResults": []
}
],
"_tnc_request_url": "https://www.douyin.com/aweme/v1/web/aweme/post/?device_platform=webapp&aid=6383&channel=channel_pc_web&sec_user_id=MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM&max_cursor=1758711687000&locate_query=false&show_live_replay_strategy=1&need_time_list=0&time_list_query=0&whale_cut_token=&cut_version=1&count=18&publish_video_strategy_type=2&from_user_page=1&update_version_code=170400&pc_client_type=1&pc_libra_divert=Windows&support_h265=1&support_dash=1&cpu_core_num=16&version_code=290100&version_name=29.1.0&cookie_enabled=true&screen_width=1707&screen_height=960&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=148.0.0.0&browser_online=true&engine_name=Blink&engine_version=148.0.0.0&os_name=Windows&os_version=10&device_memory=32&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&webid=7645647355106297371&uifid=e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad",
"_method": "GET",
"_url": "https://www.douyin.com/aweme/v1/web/aweme/post/?device_platform=webapp&aid=6383&channel=channel_pc_web&sec_user_id=MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM&max_cursor=1758711687000&locate_query=false&show_live_replay_strategy=1&need_time_list=0&time_list_query=0&whale_cut_token=&cut_version=1&count=18&publish_video_strategy_type=2&from_user_page=1&update_version_code=170400&pc_client_type=1&pc_libra_divert=Windows&support_h265=1&support_dash=1&cpu_core_num=16&version_code=290100&version_name=29.1.0&cookie_enabled=true&screen_width=1707&screen_height=960&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=148.0.0.0&browser_online=true&engine_name=Blink&engine_version=148.0.0.0&os_name=Windows&os_version=10&device_memory=32&platform=PC&downlink=10&effective_type=4g&round_trip_time=100&webid=7645647355106297371&uifid=e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad&verifyFp=verify_mpsa0ewc_o2S0aS1C_vEgk_4ugH_Bt3E_3o6tKY4qAVxU&fp=verify_mpsa0ewc_o2S0aS1C_vEgk_4ugH_Bt3E_3o6tKY4qAVxU",
"bdmsInvokeList": [
{
"args": [
"GET",
url,
true
]
},
{
"args": [
"Accept",
"application/json, text/plain, */*"
]
},
{
"args": [
"uifid",
"e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad"
]
}
],
"_reqHeaders": {
"Accept": "application/json, text/plain, */*",
"uifid": "e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad"
},
"_start": 1780540260066,
"_data": null
}
xhr = new XMLHttpRequest();
Object.assign(xhr, e)
xhr.send(null);
return window.a_bogus;
}
- py代码
import requests
import urllib.parse
import time
import execjs
from loguru import logger
class DY_detail:
headers = {}
cookies = {}
def __init__(self,url:str,sec_user_id:str) -> None:
self.url=url
self.sec_user_id=sec_user_id
self.params={
"device_platform": "webapp",
"aid": "6383",
"channel": "channel_pc_web",
"sec_user_id": sec_user_id,
"max_cursor": "0",
# "max_cursor": "1774671551"+"000", # 翻页关键 获取的是截至时间戳时间前 发布的17个作品
"locate_query": "false",
"show_live_replay_strategy": "1",
"need_time_list": "1",
"time_list_query": "0",
"whale_cut_token": "",
"cut_version": "1",
"count": "18",
"publish_video_strategy_type": "2",
"from_user_page": "1",
"update_version_code": "170400",
"pc_client_type": "1",
"pc_libra_divert": "Windows",
"support_h265": "1",
"support_dash": "1",
"cpu_core_num": "16",
"version_code": "290100",
"version_name": "29.1.0",
"cookie_enabled": "true",
"screen_width": "1707",
"screen_height": "960",
"browser_language": "zh-CN",
"browser_platform": "Win32",
"browser_name": "Chrome",
"browser_version": "148.0.0.0",
"browser_online": "true",
"engine_name": "Blink",
"engine_version": "148.0.0.0",
"os_name": "Windows",
"os_version": "10",
"device_memory": "32",
"platform": "PC",
"downlink": "10",
"effective_type": "4g",
"round_trip_time": "50",
"webid": "7645647355106297371",
"uifid": "e8af8eec168e6006bb749042c72c8d2abad7941d853b8500624783ee98d61da6bcbeac54fcc103d6fd10aa31ab4c6ab8e731cecf93ed00ea6b62e999a55cb8c4106a01d02b2fdf7ea853ee76c8afa07605f633389c1e22cd1ed43ac919ce9683ca717e6fd8bc3df4b741060f61c0606f3c8da924e79de18e7daf6e41c20c44901cd3e2e96610eadab683d7220a5903eff001b89c23005c1991c92c792c1204c60a031f9efc741914f774bec7e863a8ad",
"msToken": "OA_uYwxpbqdTYfGJNGDUmN2vjw15dNhPoyZcMYaDv0oY7MqEpWyq00vhZY4MlqA36O0fkD3_2QYeD_NG78ZpH5GF8H24ibR0rr-oneeGrE1BW9G6WENAxseMDVGfRf2syYFjTMJxmjutV16BOknZVwwJ1DVGgQe6TBLfQFjz_Llb-iyx-2QAJlk=",
# "a_bogus": "OjURD7SJOZ5cFd/GYcct9JrUr6LMNTuyUZT/Rw9PyPPoPZUcQRN6PNC1boF7ss/REupTiCIH3nlMYdVc8zUkZenkFmkkuwz6dG/VV86LhqN2GFz8LN8LCwgFzw0u0c7ia5cfilU5Ws0iIxI5VHIYABIGt5FwQYL2WNZCp2T9jDC83TLTVo5GeaZw",
"verifyFp": "verify_mpsa0ewc_o2S0aS1C_vEgk_4ugH_Bt3E_3o6tKY4qAVxU",
"fp": "verify_mpsa0ewc_o2S0aS1C_vEgk_4ugH_Bt3E_3o6tKY4qAVxU",
"timestamp": str(int(time.time())),
"x-secsdk-web-signature": "71a87bd570ed261098e5ba96646556b4"
}
self.work_num=0 # 作品数量
self.num=0 # 请求次数
with open('env.js','r',encoding='utf-8')as f:
js_code = f.read()
self.ctx=execjs.compile(js_code)
def get_params(self,max_cursor:str="0"):
params=self.params.copy()
params['max_cursor']=max_cursor
params['sec_user_id']=self.sec_user_id
urlpage=self.url+urllib.parse.urlencode(params)
# print(urlpage)
a_bogus=self.ctx.call('get_a_bogus',urlpage)
params['a_bogus']=a_bogus
return params
def get_res(self,max_cursor:str="0"):
params=self.get_params(max_cursor)
response = requests.get(self.url, headers=self.headers, cookies=self.cookies, params=params)
if response.status_code!=200:
logger.error(f"请求失败,状态码:{response.status_code}")
return None
data=response.json()
if 'aweme_list' not in data:
logger.error(f"请求失败,返回数据格式错误")
return None
return data
def res_parse(self,data:dict):
self.num+=1
rt={}
rt['min_cursor']=data.get('min_cursor')
rt['max_cursor']=data.get('max_cursor')
listt=data.get('aweme_list')
name=listt[0].get('author').get('nickname')
l=len(listt)
logger.info(f"第{self.num}次请求,获取到{l}条作品")
self.work_num+=l
self.list_parse(data)
rt['flag']=0
# 第一次请求,往往数量多余17,实际数量为17+置顶作品数量
if l<17:
rt['flag']=1
return rt
def list_parse(self,data:dict):
listt=data.get('aweme_list')
for item in listt:
print(item.get('desc'))
def req(self,max_cursor:str="0"):
data=self.get_res(max_cursor)
rt=self.res_parse(data)
# if self.num==2:
# return
if rt['flag']==0:
self.req(rt['max_cursor'])
def get_info(self):
logger.info(f"共获取到{self.work_num}条作品")
if __name__ == '__main__':
sec_user_id="MS4wLjABAAAAompXkPoYOGsA152dqYoytKycjIZ_aCCxHwGmLX5IsDM"
# sec_user_id="MS4wLjABAAAAqheum9V2BLGUubb4lvYy_0zbT-AtMsv4XWb7u4VqF1pIJIt5s2RsRv6YmC556XkH"
url = "https://www.douyin.com/aweme/v1/web/aweme/post/"
d=DY_detail(url,sec_user_id)
d.req()
d.get_info()
演示



浙公网安备 33010602011771号