Get all the "language-javascript" and "language-typescript" classes

I like to web scrape all the "language-javascript" and "language-typescript" classes at the web page
An introduction to type programming in TypeScript .

i.e. the desired results are:

const obj = {name: 'foo'}
type Obj = {name: string}

...

function fn(a, b = 'world') { return [a, b] }
const result = fn('hello') // ["hello", "world"]
type Fn  <A extends string, B extends string = 'world'>   =  [A, B]
//   ↑    ↑           ↑                          ↑              ↑
// name parameter parameter type          default value   function body/return statement

type Result = Fn<'hello'> // ["hello", "world"]

...

How?
Please help.
Thanks.