Fix Lequipe.fr (json)

merge-requests/3/head
magnolia1234 2 years ago
parent 8a5ccb807a
commit bdf58ab505

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix Lequipe.fr (json)
* v2.5.6.0 (2022-02-13)
Add Condé Nast magazines & Vogue Business
@ -206,7 +207,7 @@ Update custom sites (block regex for default sites)
* v2.4.0.0 (2021-10-17)
Add Westfaelische Nachrichten (Germany)
Remove Australian Provincial Newspapers (fix obsolete)
Remove Australian Provincial Newspapers (obsolete)
Fix GElocal.it
Fix National Review
Fix Ruhr Nachrichten (amp)
@ -275,7 +276,7 @@ Fix group Crain Communications
Add Ad Age & Automotive News (group Crain Communications)
Add MediaNews Group (local USA)
Add The Intercept
Remove Slader (fix obsolete)
Remove Slader (obsolete)
Fix group Mediahuis Nederland Regional
Fix Medium (timing)
Fix The Australian
@ -353,7 +354,7 @@ Update custom sites (set useragent Bingbot)
* v2.2.6.0 (2021-06-20)
Add group Mediahuis Nederland Regional
Remove The Northern Star (fix obsolete)
Remove The Northern Star (obsolete)
Fix Atlantico.fr
Fix Boston Globe (no opt-in)
Fix Foreign Policy

@ -1131,26 +1131,34 @@ else if (matchDomain('lequipe.fr')) {
if (par_type) {
article.innerHTML = '';
let json_split = json.split('__type:' + par_type);
if (json_split.length < 5) {
par_type = json.split('content:"')[1].split('"},{__type:')[1].split(',')[0];
json_split = json.split('__type:' + par_type);
}
let article_dom;
let article_text = '';
let parser = new DOMParser();
for (let par of json_split) {
par = par.split('}')[0];
if (par.includes(',content:')) {
let content = par.split(',content:')[1].split('",')[0];
let par_title = '';
if (par.includes(',title:'))
par_title = par.split(',title:')[1].split(',')[0].replace(/^\"|\"$/g, '');
if (content) {
par = content.replace('class=', '');
if (par_title.length > 2)
par = '<strong>' + par_title + '</strong><br><br>' + content;
par = par.replace(/\\u003C/g, '<').replace(/\\u003E/g, '>').replace(/\\u002F/g, '/').replace(/\\"/g, '"').replace(/^\"|\"$/g, '');
article_text += '<p>' + par + '</p>';
for (let par_main of json_split) {
if (par_main.includes(',content:')) {
if (par_main.split(',content:"').length > 2) {
if (par_main.startsWith(',title:'))
article_text += '<p><strong>' + par_main.split(',title:')[1].split(',')[0].replace(/^\"|\"$/g, '') + '</strong></p>';
par_type = json.split('content:')[1].split('"},{__type:')[1].split(',')[0];
pars = par_main.split('__type:' + par_type);
} else {
pars = [par_main];
}
for (let par of pars) {
par = par.split('}')[0];
if (par.includes(',content:')) {
let content = par.split(',content:')[1].split('",')[0];
let par_title = '';
if (par.includes(',title:'))
par_title = par.split(',title:')[1].split(',')[0].replace(/^\"|\"$/g, '');
if (content) {
par = content.replace('class=', '');
if (par_title.length > 2)
par = '<strong>' + par_title + '</strong><br><br>' + content;
par = par.replace(/\\u003C/g, '<').replace(/\\u003E/g, '>').replace(/\\u002F/g, '/').replace(/\\"/g, '"').replace(/^\"|\"$/g, '');
article_text += '<p>' + par + '</p>';
}
}
}
}
}

@ -620,5 +620,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.5.6.0"
"version": "2.5.6.1"
}

@ -647,7 +647,7 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /(\.piano\.io\/|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|analytics)-.+\.js)/
},
"Grupo Vocento (Spain, regional daily)": {
"Grupo Vocento": {
domain: "###_es_grupo_vocento",
group: [
"diariosur.es",
@ -1626,7 +1626,7 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /(\.tinypass\.com\/|\.telegraph\.co\.uk\/martech\/js\/|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/
},
"The Times": {
"The Times (UK)": {
domain: "thetimes.co.uk",
allow_cookies: 1,
useragent: "googlebot"

@ -114,7 +114,7 @@
"block_regex": "(journey\\.vogue\\.com\\/build-.+\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-(ad|subscriptions)-.+\\.js)",
"useragent": "googlebot"
},
"Voguebusiness.com": {
"Vogue Business": {
"allow_cookies": 1,
"domain": "voguebusiness.com",
"useragent": "googlebot"

Loading…
Cancel
Save