Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ExorcismAcademy #289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion dosagelib/plugins/e.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher
# SPDX-FileCopyrightText: © 2019 Daniel Ring
import os
from re import compile, IGNORECASE
from re import compile, sub, IGNORECASE

from ..helpers import bounceStarter, indirectStarter
from ..scraper import ParserScraper, _BasicScraper, _ParserScraper
Expand Down Expand Up @@ -214,6 +214,28 @@
adult = True


class ExorcismAcademy(ParserScraper):
url = 'https://ea.asmodrawscomics.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % 'title-page'
imageSearch = '//div[contains(@class, "webcomic-image")]//img[contains(@class, "size-full")]'
prevSearch = '//a[contains(@class, "previous-webcomic-link")]'
multipleImagesPerStrip = True
adult = True

Check warning on line 224 in dosagelib/plugins/e.py

View check run for this annotation

Jenkins - Dosage / Flake8

E251

HIGH: unexpected spaces around keyword / parameter equals

Check warning on line 225 in dosagelib/plugins/e.py

View check run for this annotation

Jenkins - Dosage / Flake8

E251

HIGH: unexpected spaces around keyword / parameter equals
def namer(self, image_url, page_url):

Check warning on line 226 in dosagelib/plugins/e.py

View check run for this annotation

Jenkins - Dosage / Flake8

E251

HIGH: unexpected spaces around keyword / parameter equals
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a more fancy version of joinPathPartsNamer? Wouldn't it make sense to expand that instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I haven't figured out how use joinPathPartsNamer to zero-pad and pull out elements. Or to split on the preceding "-" (which is not always there).

def repl(m):
return "{0}-{1}".format(m.group(2).zfill(4), m.group(1))

Check warning on line 228 in dosagelib/plugins/e.py

View check run for this annotation

Codecov / codecov/patch

dosagelib/plugins/e.py#L227-L228

Added lines #L227 - L228 were not covered by tests

indexes = tuple(image_url.rstrip('/').split('/')[-3:])
day = sub(r'^(.+?)-?(?:Pg-(\d+))', repl, indexes[2])
name = "{year}-{month}-{day}".format(

Check warning on line 232 in dosagelib/plugins/e.py

View check run for this annotation

Codecov / codecov/patch

dosagelib/plugins/e.py#L230-L232

Added lines #L230 - L232 were not covered by tests
year = indexes[0],
month = indexes[1],
day = day)
return name

Check warning on line 236 in dosagelib/plugins/e.py

View check run for this annotation

Codecov / codecov/patch

dosagelib/plugins/e.py#L236

Added line #L236 was not covered by tests


class ExploitationNow(WordPressNavi):
url = 'http://www.exploitationnow.com/'
firstStripUrl = url + '2000-07-07/9'
Expand Down