Skip to content

Commit 5c7abee

Browse files
committed
[YouTube] Add mocks for new kiosks' tests
1 parent 0687977 commit 5c7abee

12 files changed

Lines changed: 3616 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"request": {
3+
"httpMethod": "GET",
4+
"url": "https://www.youtube.com/sw.js",
5+
"headers": {
6+
"Referer": [
7+
"https://www.youtube.com"
8+
],
9+
"Origin": [
10+
"https://www.youtube.com"
11+
],
12+
"Accept-Language": [
13+
"en-GB, en;q\u003d0.9"
14+
]
15+
},
16+
"localization": {
17+
"languageCode": "en",
18+
"countryCode": "GB"
19+
}
20+
},
21+
"response": {
22+
"responseCode": 200,
23+
"responseMessage": "",
24+
"responseHeaders": {
25+
"access-control-allow-credentials": [
26+
"true"
27+
],
28+
"access-control-allow-origin": [
29+
"https://www.youtube.com"
30+
],
31+
"alt-svc": [
32+
"h3\u003d\":443\"; ma\u003d2592000,h3-29\u003d\":443\"; ma\u003d2592000"
33+
],
34+
"cache-control": [
35+
"private, max-age\u003d0"
36+
],
37+
"content-security-policy": [
38+
"require-trusted-types-for \u0027script\u0027"
39+
],
40+
"content-security-policy-report-only": [
41+
"script-src \u0027unsafe-eval\u0027 \u0027self\u0027 \u0027unsafe-inline\u0027 https://www.google.com https://apis.google.com https://ssl.gstatic.com https://www.gstatic.com https://www.googletagmanager.com https://www.google-analytics.com https://*.youtube.com https://*.google.com https://*.gstatic.com https://youtube.com https://www.youtube.com https://google.com https://*.doubleclick.net https://*.googleapis.com https://www.googleadservices.com https://tpc.googlesyndication.com https://www.youtubekids.com;report-uri /cspreport/allowlist"
42+
],
43+
"content-type": [
44+
"text/javascript; charset\u003dutf-8"
45+
],
46+
"cross-origin-opener-policy": [
47+
"same-origin; report-to\u003d\"youtube_main\""
48+
],
49+
"date": [
50+
"Thu, 31 Jul 2025 19:06:56 GMT"
51+
],
52+
"document-policy": [
53+
"include-js-call-stacks-in-crash-reports"
54+
],
55+
"expires": [
56+
"Thu, 31 Jul 2025 19:06:56 GMT"
57+
],
58+
"origin-trial": [
59+
"AmhMBR6zCLzDDxpW+HfpP67BqwIknWnyMOXOQGfzYswFmJe+fgaI6XZgAzcxOrzNtP7hEDsOo1jdjFnVr2IdxQ4AAAB4eyJvcmlnaW4iOiJodHRwczovL3lvdXR1YmUuY29tOjQ0MyIsImZlYXR1cmUiOiJXZWJWaWV3WFJlcXVlc3RlZFdpdGhEZXByZWNhdGlvbiIsImV4cGlyeSI6MTc1ODA2NzE5OSwiaXNTdWJkb21haW4iOnRydWV9"
60+
],
61+
"p3p": [
62+
"CP\u003d\"This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl\u003den-GB for more info.\""
63+
],
64+
"permissions-policy": [
65+
"ch-ua-arch\u003d*, ch-ua-bitness\u003d*, ch-ua-full-version\u003d*, ch-ua-full-version-list\u003d*, ch-ua-model\u003d*, ch-ua-wow64\u003d*, ch-ua-form-factors\u003d*, ch-ua-platform\u003d*, ch-ua-platform-version\u003d*"
66+
],
67+
"report-to": [
68+
"{\"group\":\"youtube_main\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/youtube_main\"}]}"
69+
],
70+
"reporting-endpoints": [
71+
"default\u003d\"/web-reports?context\u003deJwNz1tIk3EYBvA-HxLdp9_3_V8vRA0yETroZGpTKC0oPGBpBoXiVi51m4e5mW1rlt2EWJZIYeUhkyRIEZQICWRaXQRS0AEPF5nSwQ4YonWhiWb2XvyuHt6H59V1bZ2KrpJqNqul2Gyn9OjSWcm8s1bKeHtOas50SysP3dKA3y0tRHslU4xXap_ySo6PPml9zid1a4UBtsjCAB_zF-lgs-mw3KHD7xkd6pZ0MMXJUBJkEJvIkbGQJ6PKLONJrwz_YxmzP2R4TCH4ZQmB0RMC10oI5vNDMdoRivGJUMSfUJDWrKBvWEH-mIKbzP5XweKGgpR0FYNZKrxWFf0OFbJXRWeTisQ2FVksqEdF-CsVo7EagiwadMx4W8P4XQ1drzXM_NGwf03DqTABzx6Bkb0CFqNAyj6BhoMCXScFZosFcu0CpZUCPXUC9fWcsfhrAm-aBQ61CCy1CiTdEjhwR-BZv8CHAYGoQYHNpwJhkwLT7wW2zQukLgl8WRUoXxew_xO4sYWgBBOuhxOqIwjPIwnDUYT27YQu9i2GMLqL8H03ITmZYGSBRoIljdB7mDCXQRjKJEyzuGzCZg5h5Qih6CjBzE4zCythZczGylklczAnq2G1zM28zMcusHp27xh35hMajxN-FhByTYTPZr4pJtjt3MEm2TpbcxGCPbzxIiHiMmGV7Wjgm0bCIku_Qmi4yvubCAWtBLQRljs57-afH_C-Xv67j_BpgJDpJ-SNENQxQstLAslB7zYGXwRq94e-Bsbo61wet6fEmnDeWqK31bqcbr3VWaYvra1wV5SecRQnGZKMhtRkQ0KiobjG8B-xPcol\""
72+
],
73+
"server": [
74+
"ESF"
75+
],
76+
"set-cookie": [
77+
"YSC\u003d8-LUGALaWbw; Domain\u003d.youtube.com; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone",
78+
"VISITOR_INFO1_LIVE\u003d; Domain\u003d.youtube.com; Expires\u003dFri, 04-Nov-2022 19:06:56 GMT; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone"
79+
],
80+
"strict-transport-security": [
81+
"max-age\u003d31536000"
82+
],
83+
"x-content-type-options": [
84+
"nosniff"
85+
],
86+
"x-frame-options": [
87+
"SAMEORIGIN"
88+
],
89+
"x-xss-protection": [
90+
"0"
91+
]
92+
},
93+
"responseBody": "\n self.addEventListener(\u0027install\u0027, event \u003d\u003e {\n event.waitUntil(self.skipWaiting());\n });\n self.addEventListener(\u0027activate\u0027, event \u003d\u003e {\n event.waitUntil(\n self.clients.claim().then(() \u003d\u003e self.registration.unregister()));\n });\n ",
94+
"latestUrl": "https://www.youtube.com/sw.js"
95+
}
96+
}

extractor/src/test/resources/mocks/v1/org/schabi/newpipe/extractor/services/youtube/youtubekioskextractor/live/generated_mock_1.json

Lines changed: 92 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)