בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,362
רעדאגירונגען
(כיכר השבת האצעך געטוישט) |
(אפדעיט) |
||
| שורה 134: | שורה 134: | ||
{ telem: ".text16w", match: /\/(.*?)$/ }, | { telem: ".text16w", match: /\/(.*?)$/ }, | ||
{ telem: ".text16w" }, | { telem: ".text16w" }, | ||
{ telem: ".art_header_footer_author span" | { telem: ".art_header_footer_author span" }, | ||
{ attr: ["meta[property='vr:author']", 'content'], remove: ['מערכת ONE'] } | { attr: ["meta[property='vr:author']", 'content'], remove: ['מערכת ONE'] } | ||
], | ], | ||
| שורה 177: | שורה 177: | ||
{ str: 'וואלה' }, | { str: 'וואלה' }, | ||
[ | [ | ||
{ telem: 'div.writers-names' | { telem: 'div.writers-names' }, | ||
{ telem: 'div.author' }, | { telem: 'div.author' }, | ||
{ telem: '.info .author:first, .provider', match: /^([^\|]*)/ }, | { telem: '.info .author:first, .provider', match: /^([^\|]*)/ }, | ||
{ telem: 'div.wp-0-b:first span:first', match: /מאת:(.*),/ }, | { telem: 'div.wp-0-b:first span:first', match: /מאת:(.*),/ }, | ||
{ telem: '.author > div', match: /^([^\|]*)/ | { telem: '.author > div', match: /^([^\|]*)/ } | ||
], | ], | ||
{ attr: ["meta[property='og:title']", "content"], remove: [ / - וואלה!?.*/ ] }, | { attr: ["meta[property='og:title']", "content"], remove: [ / - וואלה!?.*/ ] }, | ||
| שורה 195: | שורה 195: | ||
{ telem: ".w2.txt-w:last", match: /, (\d+ ב.*? \d+),/ } | { telem: ".w2.txt-w:last", match: /, (\d+ ב.*? \d+),/ } | ||
] | ] | ||
] | ], | ||
removeparam: { | |||
'1': [/(מערכת )?וואלה!?[א-ת ]+/] | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 207: | שורה 210: | ||
{ telem: 'address > a' }, | { telem: 'address > a' }, | ||
{ telem: 'main > div > section > div > div > a', remove: [ 'שיתוף בוואטסאפ' ] }, | { telem: 'main > div > section > div > div > a', remove: [ 'שיתוף בוואטסאפ' ] }, | ||
{ telem: 'address' | { telem: 'address' } | ||
], | ], | ||
[ | [ | ||
| שורה 326: | שורה 329: | ||
{ str: 'ערוץ7' }, | { str: 'ערוץ7' }, | ||
[ | [ | ||
{ telem: '.article-credit--author' | { telem: '.article-credit--author' }, | ||
{ telem: '.article-info--author' | { telem: '.article-info--author' } | ||
], | ], | ||
{ telem: 'h1.article-title' }, | { telem: 'h1.article-title' }, | ||
| שורה 336: | שורה 339: | ||
], | ], | ||
{ url: 1, match: /.*(flashes).*/ } | { url: 1, match: /.*(flashes).*/ } | ||
] | ], | ||
removeparam: { | |||
'1': ['ערוץ 7'] // needed because of the space | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 383: | שורה 389: | ||
}, | }, | ||
{ | { | ||
hostname: "www. | hostname: "www.c14.co.il", | ||
params: [ | params: [ | ||
{ str: 'עכשיו 14' }, | { str: 'עכשיו 14' }, | ||
{ | [ // הימור, אין מקור טוב אחר (opt 1 + opt 2) | ||
{ attr: ["meta[ | { telem: "a[href^='/author/'] p" }, // opt 1 | ||
{ attr: [ 'main > section > article > div:nth-of-type(3) > div > div > div > img', 'alt' ] } // opt 2 | |||
], | |||
{ telem: 'h1' }, | |||
{ url: 1, match: /article\/(\d+)/ }, | |||
{ attr: ["meta[name='article:published_time']", "content"], date:['-',[2,1,0]] } | |||
], | |||
removeparam: { | |||
'1': [ /מערכת.*/, 'דסק החדשות C14' ] | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 412: | שורה 425: | ||
}, | }, | ||
{ | { | ||
hostname: "www.makorrishon.co.il", condition: function () { return location.pathname.startsWith('/nrg/'); }, minimum: 7, | |||
hostname: "www.makorrishon.co.il", condition: function () { return | |||
params: [ | params: [ | ||
{ str: 'nrg' }, | { str: 'nrg' }, | ||
[ | [ | ||
{ elem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a", match:/<!-- ARTICLE_WRITER_START -->(.*)<!-- ARTICLE_WRITER_END -->/ }, | { elem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a", match:/<!-- ARTICLE_WRITER_START -->(.*)<!-- ARTICLE_WRITER_END -->/ }, | ||
{ telem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a" } | { telem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a" }, | ||
{ telem: '.newsVitzCredit > sprint' } | |||
], | ], | ||
[ | [ | ||
{ var: 'titleName'}, | { var: 'titleName'}, | ||
{ elem: 'h1', match: [/<!-- ARTICLE_TITLE_START --> (.*?)<!-- ARTICLE_TITLE_END -->/, /(.*?) \|/] } | { elem: 'h1', match: [/<!-- ARTICLE_TITLE_START --> (.*?)<!-- ARTICLE_TITLE_END -->/, /(.*?) \|/] }, | ||
{ elem: '#titleS1' } | |||
], | ], | ||
[ | [ | ||
| שורה 453: | שורה 445: | ||
{ elem: "#articleCBar span:first, .articleBar h4:first", date: '/' }, | { elem: "#articleCBar span:first, .articleBar h4:first", date: '/' }, | ||
{ telem: ".jeg_meta_date", date: '-' }, | { telem: ".jeg_meta_date", date: '-' }, | ||
{ elem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a", match:/<!-- ARTICLE_DATE_START -->(.*)<!-- ARTICLE_DATE_END -->/, date: '/'} | { elem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a", match:/<!-- ARTICLE_DATE_START -->(.*)<!-- ARTICLE_DATE_END -->/, date: '/'}, | ||
{ telem: '.newsVitzCredit:nth-of-type(2)', date: '/' } | |||
], | ], | ||
[ | [ | ||
| שורה 466: | שורה 459: | ||
params: [ | params: [ | ||
{ str: 'מקור ראשון' }, | { str: 'מקור ראשון' }, | ||
{ | { ldjson: { key:'author'}, remove: [/(:?כתב|מערכת)? מקור ראשון/] }, | ||
{ telem: "h1:first" }, | { telem: "h1:first" }, | ||
{ url:1, match: /makorrishon\.co\.il\/(.*?)\/?$/ }, | { url:1, match: /makorrishon\.co\.il\/(.*?)\/?$/ }, | ||
] | ] | ||
}, | }, | ||
{ | { | ||
hostname: "www. | hostname: "www.one.co.il", | ||
params: [ | params: [ | ||
{ str: 'one' }, | |||
{ elem: ".article-credit > a", match: /^.*$/gm, remove: ["מאת ", "</a>"] }, | |||
{ str: 'one' }, | |||
{ elem: ".article-credit > a", match: /^.*$/gm, remove: ["מאת | |||
{ telem: "h1, #_ctl0_Main_ucFullArticle_lblCaption, #_ctl0_Main_ucFullArticle_lbColCaption" }, | { telem: "h1, #_ctl0_Main_ucFullArticle_lblCaption, #_ctl0_Main_ucFullArticle_lbColCaption" }, | ||
{ url: 1, match: [/Article\/\d\d\-\d\d\/\d,\d+,\d+,\d+\/(\d+)/i, /Article\/(\d+)/i, /id=(\d+)/] }, | { url: 1, match: [/Article\/\d\d\-\d\d\/\d,\d+,\d+,\d+\/(\d+)/i, /Article\/(\d+)/i, /id=(\d+)/] }, | ||
| שורה 510: | שורה 479: | ||
{ str: 'ישראל היום' }, | { str: 'ישראל היום' }, | ||
[ | [ | ||
{ telem: ".normal14 .normal, .content li.taxonomy-term-reference-0, .views-field-name .field-content" | { telem: ".normal14 .normal, .content li.taxonomy-term-reference-0, .views-field-name .field-content" }, | ||
{ ldjson: { key:'author'} | { ldjson: { key:'author'} } | ||
], | ], | ||
[ | [ | ||
| שורה 523: | שורה 492: | ||
{ elem: '.time', date: '.' } | { elem: '.time', date: '.' } | ||
] | ] | ||
] | ], | ||
removeparam: { | |||
'1': [/(:?כתבי|מערכת) [א-ת]+ היום/] | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 553: | שורה 525: | ||
{ str: 'TheMarker' }, | { str: 'TheMarker' }, | ||
[ | [ | ||
{ telements: [".prsnlArticleEnvelope .autorBarAnchor, .prsnlArticleEnvelope .autorBarWriters", VE | { telements: [".prsnlArticleEnvelope .autorBarAnchor, .prsnlArticleEnvelope .autorBarWriters", VE] }, | ||
{ attr: ['meta[name="author"]', "content"] }, | { attr: ['meta[name="author"]', "content"] }, | ||
{ telem: "a.author-bar li:eq(2), .h3_author" | { telem: "a.author-bar li:eq(2), .h3_author" }, | ||
{ telem: "div.art__info address" }, | { telem: "div.art__info address" }, | ||
{ var: ["_sf_async_config","authors"] } | { var: ["_sf_async_config","authors"] } | ||
| שורה 575: | שורה 547: | ||
], | ], | ||
{ url: 1, match: /\/\/(.*?).themarker/i, defvalue: "www" } | { url: 1, match: /\/\/(.*?).themarker/i, defvalue: "www" } | ||
] | ], | ||
removeparam: { | |||
'1': ["מאת:"] | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 586: | שורה 561: | ||
{ telem: "span.authorArticle" } | { telem: "span.authorArticle" } | ||
], | ], | ||
{ | { attr: ['meta[property="og:title"]', 'content'], remove: [' | כלכליסט'] }, | ||
[ | [ | ||
{ url: 1, match: /L\-(\d+)/ }, { attr: ["link[rel='alternate']", "href"], match: /guid=(\d+)/}, | { url: 1, match: /L\-(\d+)/ }, { attr: ["link[rel='alternate']", "href"], match: /guid=(\d+)/}, | ||
| שורה 676: | שורה 651: | ||
params: [ | params: [ | ||
{ str: 'אתר צה"ל' }, | { str: 'אתר צה"ל' }, | ||
{ telem: ".author-article", remove: [ /,\s | { telem: ".author-article", remove: [ /,?\s*?מערכת (את"צ|אתר צה"ל|צה"ל)/ ] }, | ||
{ telem: "h1" }, | { telem: "h1" }, | ||
[ | [ | ||
| שורה 702: | שורה 677: | ||
params: [ | params: [ | ||
{ str: 'כיפה' }, | { str: 'כיפה' }, | ||
{ telem: "author", remove: [ | { telem: "author", remove: [", כיפה"] }, | ||
{ telem: "h1" }, | { telem: "h1" }, | ||
{ url: 1, match: /co\.il\/(.+)/ }, | { url: 1, match: /co\.il\/(.+)/ }, | ||
| שורה 848: | שורה 823: | ||
'ashnav': 'אשנב', | 'ashnav': 'אשנב', | ||
'baderech': 'עיתונות|baderech', | 'baderech': 'עיתונות|baderech', | ||
'bamahane' :'עיתונות|bamahane', | |||
'bamar': 'במערכה', | 'bamar': 'במערכה', | ||
'bustenai': 'עיתונות|bustenai', | 'bustenai': 'עיתונות|bustenai', | ||
| שורה 864: | שורה 840: | ||
'hadt': 'האחדות', | 'hadt': 'האחדות', | ||
'haibri': 'העברי', | 'haibri': 'העברי', | ||
'hairtlv': 'העיר', | |||
'ham': 'העם', | 'ham': 'העם', | ||
'haolam': 'העולם', | 'haolam': 'העולם', | ||
| שורה 916: | שורה 893: | ||
'mrh': 'מוריה', | 'mrh': 'מוריה', | ||
'mzp': 'המצפה', | 'mzp': 'המצפה', | ||
'newpalestine' :'עיתונות|newpalestine', | |||
'omer': 'אמר', | 'omer': 'אמר', | ||
'pisgoh': 'הפסגה', | 'pisgoh': 'הפסגה', | ||
'plb' :'עיתונות|plb', | |||
'shar': 'שערים', | 'shar': 'שערים', | ||
'sulm': 'סלם', | 'sulm': 'סלם', | ||
| שורה 1,040: | שורה 1,019: | ||
params: [ | params: [ | ||
{ str: 'חרדים10' }, | { str: 'חרדים10' }, | ||
{ | { attr: ['meta[name="author"]', 'content'], remove: ['חרדים 10'] }, | ||
{ | { attr: ['meta[property="og:title"]', 'content'] }, | ||
{ url: 1, match: /news\/(\d+)/ }, | { url: 1, match: /news\/(\d+)/ }, | ||
{ | { attr: ['meta[property="article:published_time"]', 'content'], date: ['-', '210'] } | ||
] | ] | ||
}, | }, | ||
| שורה 1,061: | שורה 1,040: | ||
[ | [ | ||
{ ldjson: { key: 'author' } }, | { ldjson: { key: 'author' } }, | ||
{ telem: 'span.article-reporter a' | { telem: 'span.article-reporter a' }, | ||
{ telem: 'a[rel=Author]' }, | { telem: 'a[rel=Author]' }, | ||
{ telem: '.article-date-report-wrap', match: /^.*\|(.*)$/m }, | { telem: '.article-date-report-wrap', match: /^.*\|(.*)$/m }, | ||
{ telem: 'span.article-reporter', | { telem: 'span.article-reporter' }, | ||
], | ], | ||
[ | [ | ||
| שורה 1,197: | שורה 1,176: | ||
{ str: 'דבר העובדים' }, | { str: 'דבר העובדים' }, | ||
[ | [ | ||
{ attr: ['section', 'data-author_name | { attr: ['section', 'data-author_name'] }, | ||
{ attr: ['article', 'data-author_name | { attr: ['article', 'data-author_name'] } | ||
], | ], | ||
[ | [ | ||
| שורה 1,209: | שורה 1,188: | ||
{ telem: '.g-article-date', date: '.' } | { telem: '.g-article-date', date: '.' } | ||
] | ] | ||
] | ], | ||
removeparam: { | |||
'1': [ 'דבר ראשון' ] // old name in old articles | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 1,352: | שורה 1,334: | ||
params:[ | params:[ | ||
{ str: "JDN"}, | { str: "JDN"}, | ||
{ telem: "span.elementor-post-info__item--type-author" | { telem: "span.elementor-post-info__item--type-author" }, | ||
{ telem: "h1.elementor-heading-title" }, | { telem: "h1.elementor-heading-title" }, | ||
{ url: 1, match: /\/(\d+)\// }, | { url: 1, match: /\/(\d+)\// }, | ||
| שורה 1,388: | שורה 1,370: | ||
params: [ | params: [ | ||
{ str: 'יובל אראל'}, | { str: 'יובל אראל'}, | ||
{ telem: 'a.author-name' | { telem: 'a.author-name' }, | ||
{ telem: 'h1.post-title ' }, | { telem: 'h1.post-title ' }, | ||
{ url: 1, match: /com\/(.*)/ } | { url: 1, match: /com\/(.*)/ } | ||
| שורה 1,398: | שורה 1,380: | ||
{ str: 'גיקטיים'}, | { str: 'גיקטיים'}, | ||
[ | [ | ||
{ telem: 'p.post-meta > a' | { telem: 'p.post-meta > a' }, | ||
{ telem: 'section.post-content > p > strong' | { telem: 'section.post-content > p > strong' }, | ||
{ telem: '.author' | { telem: '.author' } | ||
], | ], | ||
| שורה 1,412: | שורה 1,394: | ||
{ telem: '.date', date: '.' } | { telem: '.date', date: '.' } | ||
], | ], | ||
] | ], | ||
removeparam: { | |||
'1': [ 'כתב אורח', /מאת:? / ] | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 1,462: | שורה 1,447: | ||
params: [ | params: [ | ||
{ str: 'שיחה מקומית'}, | { str: 'שיחה מקומית'}, | ||
{ telem: 'article#main > header > div.post_details > a' | { telem: 'article#main > header > div.post_details > a' }, | ||
{ telem: 'article#main > header > h1.post_title' }, | { telem: 'article#main > header > h1.post_title' }, | ||
{ url: 1, match: /il\/(.*)\// }, | { url: 1, match: /il\/(.*)\// }, | ||
| שורה 1,473: | שורה 1,458: | ||
{ str: 'עונג שבת'}, | { str: 'עונג שבת'}, | ||
[ | [ | ||
{ telem: 'div.post-body > div > span' | { telem: 'div.post-body > div > span' }, | ||
{ telem: 'div.post-body > div > b' | { telem: 'div.post-body > div > b' }, | ||
{ telem: 'div.post-body > div > strong' | { telem: 'div.post-body > div > strong' } | ||
], | ], | ||
{ telem: 'h3.post-title' }, | { telem: 'h3.post-title' }, | ||
| שורה 1,481: | שורה 1,466: | ||
{ url: 1, match: /blog-post_(\d+).html/ }, | { url: 1, match: /blog-post_(\d+).html/ }, | ||
{ telem: 'h2.date-header', remove: [ /.*, / ] } | { telem: 'h2.date-header', remove: [ /.*, / ] } | ||
] | ], | ||
removeparam: { | |||
'1': ['מאת', 'כתב וצילם', 'כתב'] | |||
} | |||
}, | }, | ||
{ | { | ||
| שורה 1,590: | שורה 1,578: | ||
for (var k=0; k < data[i].params[j].length; k++) { | for (var k=0; k < data[i].params[j].length; k++) { | ||
try { | try { | ||
var curParam = data[i].params[j][k]; | var curParam = data[i].params[j][k], | ||
removed = false; params[j] = ''; | |||
if (typeof curParam.str != "undefined") { | if (typeof curParam.str != "undefined") { | ||
| שורה 1,764: | שורה 1,752: | ||
if (typeof curParam.removeifempty != "undefined" && !params[j]) | if (typeof curParam.removeifempty != "undefined" && !params[j]) | ||
params[j] = 'removeifempty'; | params[j] = 'removeifempty'; | ||
if (data[i].removeparam) { | |||
if (data[i].removeparam[j]) { | |||
for (var r = 0; r < data[i].removeparam[j].length; ++r) { | |||
var currName = params[j]; | |||
params[j] = params[j].replace(data[i].removeparam[j][r], ''); | |||
if (currName != params[j]) { | |||
removed = true; | |||
} | |||
} | |||
} | |||
} | |||
// if the author is the same as the template, remove it | |||
if (j == 1 && params[0] && params[1]) { | |||
if ((params[1] == params[0]) || ((params[1].split(' ').length-1 <= params[0].split(' ').length) && params[1].toLowerCase().indexOf(params[0].toLowerCase()) > -1)) { | |||
params[1] = ''; | |||
removed = true; | |||
} | |||
} | |||
if ((params[j] != '') && (params[j] != undefined)) { | if ((params[j] != '') && (params[j] != undefined)) { | ||
console.log('found', j, params[j]); | console.log('found', j, params[j]); | ||
break; | break; | ||
} else if (removed) { | |||
console.log('not used', j, curParam); | |||
} else { | |||
console.log('not found', j, curParam); | |||
} | } | ||
} | } | ||
catch (e) { | catch (e) { | ||
| שורה 1,829: | שורה 1,840: | ||
'שרייבער': $.map($(ldojson.author), function(a) { return a.name; }).join(VE), | 'שרייבער': $.map($(ldojson.author), function(a) { return a.name; }).join(VE), | ||
'קעפל': ldojson.name || ldojson.headline, | 'קעפל': ldojson.name || ldojson.headline, | ||
'אדרעס': location.href, | |||
'זייטל': (ldojson.publisher||ldojson_website[0]).name, | 'זייטל': (ldojson.publisher||ldojson_website[0]).name, | ||
'דאטום': date != "Invalid Date" ? dateFormat([''+date.getDate(), ''+(date.getMonth()+1), ''+date.getFullYear()]) : '' | 'דאטום': date != "Invalid Date" ? dateFormat([''+date.getDate(), ''+(date.getMonth()+1), ''+date.getFullYear()]) : '' | ||
}; | }; | ||
console.log('data', general); | console.log('data', general); | ||
רעדאגירונגען