From 89db5f31a6546560311c9b21ce14b7b76794835e Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Tue, 18 Jul 2023 22:49:49 +0200 Subject: [PATCH] Fix MonsieurLeChien using archive.org (fixes #240) --- dosagelib/plugins/m.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dosagelib/plugins/m.py b/dosagelib/plugins/m.py index 8dac3469b..c60c184a5 100644 --- a/dosagelib/plugins/m.py +++ b/dosagelib/plugins/m.py @@ -165,14 +165,15 @@ class MonkeyUser(_ParserScraper): return data.xpath('//div[d:class("video-container")]', namespaces=NS) -class MonsieurLeChien(_BasicScraper): - url = 'http://www.monsieur-le-chien.fr/' +class MonsieurLeChien(ParserScraper): + url = ('https://web.archive.org/web/20210311002403/' + 'http:/www.monsieur-le-chien.fr/') stripUrl = url + 'index.php?planche=%s' firstStripUrl = stripUrl % '2' lang = 'fr' - imageSearch = compile(tagre("img", "src", r'(i/planches/[^"]+)')) - prevSearch = compile(tagre("a", "href", r'([^"]+)') + - tagre("img", "src", "i/precedent.gif")) + imageSearch = '//img[contains(@src,"i/planches/")]' + prevSearch = '//a[img[contains(@src,"i/precedent.gif")]]' + endOfLife = True help = 'Index format: n'