| 1 | #! perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | package Comics::Plugin::LoadingArtist; | ||
| 7 | |||
| 8 | use parent qw(Comics::Fetcher::Cascade); | ||
| 9 | |||
| 10 | our $VERSION = "1.03"; | ||
| 11 | |||
| 12 | our $name = "Loading Artist"; | ||
| 13 | our $url = "https://www.loadingartist.com/comic/"; | ||
| 14 | |||
| 15 | # Seems to give errors | ||
| 16 | our $disabled = 1; | ||
| 17 | |||
| 18 | our @patterns = | ||
| 19 | ( | ||
| 20 | qr{ </title> \s* | ||
| 21 | <meta \s+ property="og:url" \s+ content="(?<url>.*?)" \s*/? > | ||
| 22 | }sx, | ||
| 23 | qr{ <meta \s+ property="og:title" \s+ content="(?<title>.*?)" \s*/?> | ||
| 24 | .*? | ||
| 25 | <div \s+ class="comic"> \s* | ||
| 26 | <img \s+ | ||
| 27 | src="(?<url>(?:https?://(?:www\.)?loadingartist.com)?/wp-content/uploads/ | ||
| 28 | \d+/\d+/ | ||
| 29 | (?<image>.+?\.\w+))" | ||
| 30 | }sx, | ||
| 31 | ); | ||
| 32 | |||
| 33 | # Important: Return the package name! | ||
| 34 | __PACKAGE__; |