Skip to content

feat(Innertube): Add PostManager - #1244

Draft
Illusion137 wants to merge 72 commits into
LuanRT:mainfrom
Illusion137:feat(posts)
Draft

feat(Innertube): Add PostManager#1244
Illusion137 wants to merge 72 commits into
LuanRT:mainfrom
Illusion137:feat(posts)

Conversation

@Illusion137

Copy link
Copy Markdown

Adds support to create posts via a PostManager class.
Noteable changes and features

  • Similarly to feat(YouTube Studio Web): add support for YouTube Studio Web and primarily its uploading capabilities #1231, this also includes a BotGuardSolver interface, which again not too sure on what interface it should be to fit all general purposes, but the version works fine for both pull requests.
  • Added a initialData() function to Innertube which takes in a YouTube page url and it extracts both the ytcfg and aTn(attestation data). Modifed HTTPClient to support these html page fetches.
  • Added support to solve attestation challenges within RunAttestationCommand
  • Added a PostManager which just allows for the creation of posts
  • An example for creating posts with image polls

Testing
Added a single example at examples/posts/src/index.ts - automatically fetches cookies if you have a chrome browser for easier testing (with caveats), then creates a PostManager and creates an IMAGE_POLL post and logs the result.

Other Notes
BackstagePostDialog may be overly long because I tried to include as much stuff also found in https://github.com/LuanRT/youtubei-dts.

The example is pretty easy to use since it does auto-fetch cookies, although it can be removed since it was just a quality of life for testing. It uses a library that if you have ChromElevator installed to path on windows, then it gets cookies that way, otherwise it uses a slightly modified version of chrome-cookies-secure. Again not necessary, just makes things easy for testing.

/att/log from my testing, will return 200 no matter what, as long as it has the right shape. Not exactly sure if there is a verifiable way to see if the BotGuardSolver that you pass in is in any way correct. Nonetheless it is still kept in the create post pipeline just in case.

Fixes #255

…eatePost` interface + fetching ytcfg and init attestation + update parser to include a version of `RunAttestationCommand` + create the main logic for `createPost()`
… as an command, just parse it as an action instead of creating a duplicate class
…Continuation` and `FilteredChannelList`

should really refactor Actions into a general Actions type
…y grab the `attestation_data` from the `R` component
…age_attestation_cache` and also await the attestation command's botguard_solver
…nager.create()` have different return type based on parameters + update posts example
@Illusion137
Illusion137 marked this pull request as draft August 19, 2026 01:48
@LuanRT LuanRT changed the title Feat(Create Posts): add a PostManager to create posts feat(Innertube): Add PostManager Aug 19, 2026
…ager take in a required`content_binding` instead + update the log function to auto support new system
fix(BotGuard): make challenge fetching use new `ChallengeFetchingArgs` instead of `ChallengeSolverArgs`
…Challenge` args and refactored `client` to be of type `InnerTubeClient`
… add a function to solve the studio session process: `studioSessionToken`
…ResponseData` + rework `studioSessionToken`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to post in community tab

1 participant