Benjamin Loison

Results 438 comments of Benjamin Loison

```bash minimizeCURL curl.sh 'ADHD Test' ``` ``` ... curl https://www.youtube.com/youtubei/v1/search -H 'Content-Type: application/json' --data-raw '{"context": {"client": {"clientName": "WEB", "clientVersion": "2.20240909.02.00"}}, "continuation": "EugNEgR0ZXN0GtwNRXBzS2tnR1hDanFWQVJLT0FTaGhJSGx2ZFhSMVltVmZjMmh2Y25SelgyVnNhV2RwWW14bElEcDBlWEJsT25JZ0tHNGdlVzkxZEhWaVpWOW1iR0ZuWDJoaGMxOXdjbVZ0YVdWeVpWOTJhV1JsYjE5dFpYUmhaR0YwWVQweElEcDBlWEJsT25JcElDaHVJSGx2ZFhSMVltVmZabXhoWjE5b1lYTmZiR2wyWlY5emRISmxZVzFmYldWMFlXUmhkR0U5TVNBNmRIbHdaVHB5S1NrNEFXQWFTdndJQ2lZS0JIUmxjM1RxQVE4S0RWb0xDZ2NJaGdFU0FCZ0xHR0h5QVFVS0EwRnNiTmdDQWJnRFlRcTFBZW9CRHdvTldnc0tCd2lHQVJJQUdBc1lHdklCQ0FvR1UyaHZjblJ6d2dLT0FTaGhJSGx2ZFhSMVltVmZjMmh2Y25SelgyVnNhV2RwWW14bElEcDBlWEJsT25JZ0tHNGdlVzkxZEhWaVpWOW1iR0ZuWDJoaGMxOXdjbVZ0YVdWeVpWOTJhV1JsYjE5dFpYUmhaR0YwWVQweElEcDBlWEJsT25JcElDaHVJSGx2ZFhSMVltVmZabXhoWjE5b1lYTmZiR2wyWlY5emRISmxZVzFmYldWMFlXUmhkR0U5TVNBNmRIbHdaVHB5S1NuNEFnRzRBeG9LVE9vQkR3b05XZ3NLQndpR0FSSUFHQXNZU1BJQkNBb0dWbWxrWlc5endnSWFlVzkxZEhWaVpWOTJhV1JsYjE5d1lXZGxJRHAwZVhCbE9uTG9BZ0dvQXdHNEEwakFBd0hJQXdIUUF3RUtLT29CRHdvTldnc0tCd2lHQVJJQUdBc1lIUElCQ3dvSlZXNTNZWFJqYUdWa3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FnZEdWemRPb0JHQW9XV2hRS0J3aUdBUklBR0FzU0NYUmxjM1JmZEdWemRQSUJDd29KVkdWemRDQjBaWE4wQ2ljS0NHVjVaU0IwWlhOMDZnRVNDaEJhRGdvSENJWUJFZ0FZQ3hJRFpYbGw4Z0VGQ2dORmVXVUtQQW9QYldWdWRHRnNJR0ZuWlNCMFpYTjA2Z0VaQ2hkYUZRb0hDSVlCRWdBWUN4SUtiV1Z1ZEdGc1gyRm5aZklCREFvS1RXVnVkR0ZzSUdGblpRb19DaEJqYjJ4dmNpQmliR2x1WkNCMFpYTjA2Z0VhQ2hoYUZnb0hDSVlCRWdBWUN4SUxZMjlzYjNKZllteHBibVR5QVEwS0MwTnZiRzl5SUdKc2FXNWtHQXRhRFFvTENBUXFCd2lHQVJJQUdBdDRBQSUzRCUzRJABARiB4OgYIgtzZWFyY2gtcGFnZQ%3D%3D"}' ``` Python script with hardcoded continuation: ```python import...

```python import base64 import blackboxprotobuf import urllib.parse as ul import copy import binascii def getBase64Protobuf(message, typedef): data = blackboxprotobuf.encode_message(message, typedef) return base64.b64encode(data).decode('ascii') def isRequestStillFine(httpMethod, url, params, headers, data, needle): data...

Similar to: https://github.com/Benjamin-Loison/YouTube-operational-API/blob/0e4168e9ed307cc760f1fe4d69aa8143a4a66ba1/tools/minimizeCURL.py#L151-L228 `isJson` part. Commenting this code seems to make sense. git blame may help: ``` commit bb31362388beba3aa97b25d40dcf924e2c2bc931 Author: Benjamin Loison Date: Wed Jun 14 21:36:31 2023 +0200 Removes...

Not simplified Protobuf typedef with simplified message: ``` { "2": { "2": "test" } } { "2": { "field_order": [ "2", "3", "18" ], "message_typedef": { "2": { "type": "string"...

Simplified Protobuf typedef: ```json { "2": { "message_typedef": { "2": { "type": "string" } }, "type": "message" } } ``` Hence, simplified Python script: ```python import requests import json import...

```python PARAMS = { 'prettyPrint': 'false', } ``` can be useful to check first item to be given one.

Note that there are 2 paths, one inside `data` and the other within `message`.

It does not seem possible to easily simplify by hand recursively by recalling the minimizer with differents arguments.

Note that for simplifying Protobuf I usually proceed level by level as it helps me prototyping. None of both following work: ```py data = base64.b64decode(base64.urlsafe_b64decode('Q2c5RFNVTmpiVXRCUjBWTGFsWm9Wa0VRQUE='), altchars = '-/') ``` ```py...

The question is where does this timestamp comes from. Note that the community post id does not seem just base64 encoded, nor Protobuf.