|
@@ 4184-4198 (lines=15) @@
|
| 4181 |
|
long_name = 'Art By Moga' |
| 4182 |
|
url = 'http://artbymoga.tumblr.com' |
| 4183 |
|
|
| 4184 |
|
|
| 4185 |
|
class VerbalVomitTumblr(GenericTumblrV1): |
| 4186 |
|
"""Class to retrieve Verbal Vomit comics.""" |
| 4187 |
|
# Also on http://www.verbal-vomit.com |
| 4188 |
|
name = 'vomit-tumblr' |
| 4189 |
|
long_name = 'Verbal Vomit (from Tumblr)' |
| 4190 |
|
url = 'http://verbalvomits.tumblr.com' |
| 4191 |
|
|
| 4192 |
|
|
| 4193 |
|
class LibraryComic(GenericTumblrV1): |
| 4194 |
|
"""Class to retrieve LibraryComic.""" |
| 4195 |
|
# Also on http://librarycomic.com |
| 4196 |
|
name = 'library-tumblr' |
| 4197 |
|
long_name = 'LibraryComic (from Tumblr)' |
| 4198 |
|
url = 'http://librarycomic.tumblr.com' |
| 4199 |
|
|
| 4200 |
|
|
| 4201 |
|
class HorovitzComics(GenericListableComic): |
|
@@ 2952-2964 (lines=13) @@
|
| 2949 |
|
'author': author, |
| 2950 |
|
'day': day.day, |
| 2951 |
|
'month': day.month, |
| 2952 |
|
'year': day.year, |
| 2953 |
|
'img': [i['src'] for i in imgs], |
| 2954 |
|
} |
| 2955 |
|
|
| 2956 |
|
|
| 2957 |
|
class GenericWordPressInkblot(GenericNavigableComic): |
| 2958 |
|
"""Generic class to retrieve comics using WordPress with Inkblot.""" |
| 2959 |
|
get_navi_link = get_link_rel_next |
| 2960 |
|
|
| 2961 |
|
@classmethod |
| 2962 |
|
def get_first_comic_link(cls): |
| 2963 |
|
"""Get link to first comics.""" |
| 2964 |
|
return get_soup_at_url(cls.url).find('a', class_='webcomic-link webcomic1-link first-webcomic-link first-webcomic1-link') |
| 2965 |
|
|
| 2966 |
|
@classmethod |
| 2967 |
|
def get_comic_info(cls, soup, link): |
|
@@ 2656-2667 (lines=12) @@
|
| 2653 |
|
def get_comic_info(cls, soup, link): |
| 2654 |
|
"""Get information about a particular comics.""" |
| 2655 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 2656 |
|
assert all(i['alt'] == i['title'] for i in imgs) |
| 2657 |
|
assert len(imgs) == 1 |
| 2658 |
|
return { |
| 2659 |
|
'img': [i['src'] for i in imgs], |
| 2660 |
|
'title': imgs[0]['title'], |
| 2661 |
|
} |
| 2662 |
|
|
| 2663 |
|
|
| 2664 |
|
class GenericCommitStrip(GenericNavigableComic): |
| 2665 |
|
"""Generic class to retrieve Commit Strips in different languages.""" |
| 2666 |
|
get_navi_link = get_a_rel_next |
| 2667 |
|
get_first_comic_link = simulate_first_link |
| 2668 |
|
first_url = NotImplemented |
| 2669 |
|
|
| 2670 |
|
@classmethod |