-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Hi,
I'm trying to add a script to manage the addition of Oglaf comic in french version on my local dosage, but I'm having an issue with setting it up (not used to python and haven't coded anything in almost 15 years...)
I'm using dosage.exe 3.0 (standard version, not legacy) Using Python 3.10.4 (CPython) on Windows-10-10.0.19045-SP0
I created the following oglaffrench.py script in my user plugin directory :
`from ..scraper import ParserScraper
class oglaffrench(ParserScraper):
url = 'https://oglaf.lapin.org/'
stripUrl = url + 'index.php?number=%s'
firstStripUrl = stripUrl % '1'
#imageSearch = '//div[d:class("comicpane")]//img'
imageSearch = '//div/div[1]/div[2]/div[2]/img'
prevSearch = '//a[@rel="«précédent "]'
help = 'Index format: n (unpadded)'`
Not sure about the use of class for the imageSearch parameter, but the way I wrote it seems to get me the correct image.
However, I don't manage to make the prevSearch parameter work, how can I do that?
Thanks for your help!
Also, not directly related, but I did try a full download of the original oglaf comic (supported by default), but the pictures are saved with their server names, any way to add a prefix on the filename during the import so I can sort them by release date?