File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,17 +22,19 @@ process.chdir(__dirname);
2222 "prop" : "revisions|description" ,
2323 "generator" : "categorymembers" ,
2424 "rvprop" : "ids|content" ,
25+ "rvsection" : "0" ,
26+ "rvslots" : "main" ,
2527 "gcmtitle" : "Category:Articles for deletion" ,
2628 "gcmnamespace" : "0" ,
2729 "gcmtype" : "page" ,
28- "gcmlimit" : "500 "
30+ "gcmlimit" : "100 "
2931 } ) . then ( jsons => {
3032 revidsTitles = { } ;
3133 tableInfo = { } ;
3234 var pages = jsons . reduce ( ( pages , json ) => pages . concat ( json . query . pages ) , [ ] ) ;
3335 pages . forEach ( pg => {
3436 revidsTitles [ pg . revisions [ 0 ] . revid ] = pg . title ;
35- var afd_template = new bot . Wikitext ( pg . revisions [ 0 ] . content ) . parseTemplates ( {
37+ var afd_template = new bot . Wikitext ( pg . revisions [ 0 ] . slots . main . content ) . parseTemplates ( {
3638 count : 1 ,
3739 namePredicate : name => name === 'Article for deletion/dated' || name === 'AfDM'
3840 } ) [ 0 ] ;
@@ -74,12 +76,13 @@ process.chdir(__dirname);
7476 gcmlimit : '500' ,
7577 gcmtype : 'page' ,
7678 prop : 'revisions' ,
77- rvprop : 'content'
79+ rvprop : 'content' ,
80+ rvslots : 'main' ,
7881 } ) . then ( jsons => {
7982 var pages = jsons . reduce ( ( pages , json ) => pages . concat ( json . query . pages ) , [ ] ) ;
8083 pages . forEach ( pg => {
8184 if ( pg . missing ) return ; // should never happen
82- var text = pg . revisions [ 0 ] . content ;
85+ var text = pg . revisions [ 0 ] . slots . main . content ;
8386 var concern = text . replace ( / ^ \s * [: * # { } | ! = < ] .* $ / mg, '' ) . replace ( / ^ \s * $ / mg, '' ) . trim ( ) ;
8487
8588 // cut at the first newline coming after the first timestamp
You can’t perform that action at this time.
0 commit comments