philbot9 / youtube-comments-task

Scrape comments, including their replies, from a YouTube video.
ISC License
39 stars 4 forks source link

Session token extraction fails sometimes #26

Closed philbot9 closed 4 years ago

philbot9 commented 4 years ago

Looks like YouTube is doing some A/B Testing with a modified video page. On the new page, extraction of the session token (XSRF_TOKEN) fails.

The new page still contains the token, but it is part of a JSON string which means the extraction in session-store fails.

https://github.com/philbot9/youtube-comments-task/blob/4f08d0994829ab93b8dd15008bd99b592f1e3a23/src/lib/youtube-api/session-store.js#L17

The extraction additionally has to support

"XSRF_TOKEN":"..."

The COMMENTS_TOKEN was removed, so its extraction will also fail.

https://github.com/philbot9/youtube-comments-task/blob/4f08d0994829ab93b8dd15008bd99b592f1e3a23/src/lib/youtube-api/session-store.js#L26

It's possibly been replaced by

"continueAction":"..."
philbot9 commented 4 years ago

fixed in 1.3.15