File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { writeFile } from 'fs' ;
1+ // import { writeFile } from 'fs';
22import { csfd } from './src' ;
33
44// Parse movie
5- // csfd.movie(535121).then((movie) => console.log(movie));
5+ csfd . movie ( 535121 ) . then ( ( movie ) => console . log ( movie ) ) ;
66
7- // Save data in file
8- const userId = 912 ;
7+ /**
8+ * USER RATINGS
9+ */
910
10- csfd
11- . userRatings ( userId , {
12- excludes : [ 'epizoda' , 'TV pořad' , 'série' ] ,
13- allPages : true ,
14- allPagesDelay : 2000
15- } )
16- . then ( ( ratings ) => {
17- console . log ( 'Saved in file:' , `./${ userId } .json` ) ;
18- writeFile ( `${ userId } .json` , JSON . stringify ( ratings ) , ( err ) => {
19- if ( err ) return console . log ( err ) ;
20- } ) ;
21- } ) ;
11+ // // Save all pages in json file
12+ // const userId = 912;
13+ //
14+ // csfd
15+ // .userRatings(userId, {
16+ // excludes: ['epizoda', 'TV pořad', 'série'],
17+ // allPages: true,
18+ // allPagesDelay: 2000
19+ // })
20+ // .then((ratings) => {
21+ // console.log('Saved in file:', `./${userId}.json`);
22+ // writeFile(`${userId}.json`, JSON.stringify(ratings), (err) => {
23+ // if (err) return console.log(err);
24+ // });
25+ // });
2226
2327// // Only TV series
2428// csfd
You can’t perform that action at this time.
0 commit comments