npm install puppeteer
Modify your username
and the amount of pages you see in Trakt website in at the top of each .js file.
The script only writes to stdout one JSON array per page scrapped.
So you'll then need to remove extra garbage from the generated files. I'll add to a file in the future, but for now it works this way and is helpful to check if something fails.
node episodes.js > episodes.json
and
node movies.js > movies.json