|
@@ 1092-1119 (lines=28) @@
|
| 1089 |
|
} |
| 1090 |
|
|
| 1091 |
|
|
| 1092 |
|
class Mercworks(GenericDeletedComic): # Moved to Webtoons |
| 1093 |
|
"""Class to retrieve Mercworks comics.""" |
| 1094 |
|
# Also on http://mercworks.tumblr.com |
| 1095 |
|
# Also on http://www.webtoons.com/en/comedy/mercworks/list?title_no=426 |
| 1096 |
|
# Also on https://tapastic.com/series/MercWorks |
| 1097 |
|
name = 'mercworks' |
| 1098 |
|
long_name = 'Mercworks' |
| 1099 |
|
url = 'http://mercworks.net' |
| 1100 |
|
_categories = ('MERCWORKS', ) |
| 1101 |
|
get_first_comic_link = get_a_comicnavbase_comicnavfirst |
| 1102 |
|
get_navi_link = get_link_rel_next |
| 1103 |
|
|
| 1104 |
|
@classmethod |
| 1105 |
|
def get_comic_info(cls, soup, link): |
| 1106 |
|
"""Get information about a particular comics.""" |
| 1107 |
|
title = soup.find('meta', property='og:title')['content'] |
| 1108 |
|
metadesc = soup.find('meta', property='og:description') |
| 1109 |
|
desc = metadesc['content'] if metadesc else "" |
| 1110 |
|
date_str = soup.find('meta', property='article:published_time')['content'][:10] |
| 1111 |
|
day = string_to_date(date_str, "%Y-%m-%d") |
| 1112 |
|
imgs = soup.find_all('meta', property='og:image') |
| 1113 |
|
return { |
| 1114 |
|
'img': [i['content'] for i in imgs], |
| 1115 |
|
'title': title, |
| 1116 |
|
'desc': desc, |
| 1117 |
|
'day': day.day, |
| 1118 |
|
'month': day.month, |
| 1119 |
|
'year': day.year |
| 1120 |
|
} |
| 1121 |
|
|
| 1122 |
|
|
|
@@ 405-430 (lines=26) @@
|
| 402 |
|
_categories = ('DELETED', ) |
| 403 |
|
|
| 404 |
|
|
| 405 |
|
class ExtraFabulousComics(GenericNavigableComic): |
| 406 |
|
"""Class to retrieve Extra Fabulous Comics.""" |
| 407 |
|
# Also on https://extrafabulouscomics.tumblr.com |
| 408 |
|
name = 'efc' |
| 409 |
|
long_name = 'Extra Fabulous Comics' |
| 410 |
|
url = 'http://extrafabulouscomics.com' |
| 411 |
|
_categories = ('EFC', ) |
| 412 |
|
get_navi_link = get_link_rel_next |
| 413 |
|
get_first_comic_link = simulate_first_link |
| 414 |
|
first_url = 'http://extrafabulouscomics.com/comic/buttfly/' |
| 415 |
|
|
| 416 |
|
@classmethod |
| 417 |
|
def get_comic_info(cls, soup, link): |
| 418 |
|
"""Get information about a particular comics.""" |
| 419 |
|
img_src_re = re.compile('^%s/wp-content/uploads/' % cls.url) |
| 420 |
|
imgs = soup.find_all('img', src=img_src_re) |
| 421 |
|
title = soup.find('meta', property='og:title')['content'] |
| 422 |
|
date_str = soup.find('meta', property='article:published_time')['content'][:10] |
| 423 |
|
day = string_to_date(date_str, "%Y-%m-%d") |
| 424 |
|
return { |
| 425 |
|
'title': title, |
| 426 |
|
'img': [i['src'] for i in imgs], |
| 427 |
|
'month': day.month, |
| 428 |
|
'year': day.year, |
| 429 |
|
'day': day.day, |
| 430 |
|
'prefix': title + '-' |
| 431 |
|
} |
| 432 |
|
|
| 433 |
|
|
|
@@ 2483-2505 (lines=23) @@
|
| 2480 |
|
def get_comic_info(cls, soup, link): |
| 2481 |
|
"""Get information about a particular comics.""" |
| 2482 |
|
title = soup.find('h2', class_='post-title').string |
| 2483 |
|
post = soup.find('div', class_='post-content') |
| 2484 |
|
author = post.find("span", class_="post-author").find("a").string |
| 2485 |
|
date_str = post.find("span", class_="post-date").string |
| 2486 |
|
day = string_to_date(date_str, "%B %d, %Y") |
| 2487 |
|
imgs = post.find("div", class_="entry").find_all("img") |
| 2488 |
|
return { |
| 2489 |
|
'title': title, |
| 2490 |
|
'author': author, |
| 2491 |
|
'img': [i['src'] for i in imgs], |
| 2492 |
|
'month': day.month, |
| 2493 |
|
'year': day.year, |
| 2494 |
|
'day': day.day, |
| 2495 |
|
} |
| 2496 |
|
|
| 2497 |
|
|
| 2498 |
|
class LinsEditions(GenericDeletedComic): # Permanently moved to warandpeas |
| 2499 |
|
"""Class to retrieve L.I.N.S. Editions comics.""" |
| 2500 |
|
# Also on https://linscomics.tumblr.com |
| 2501 |
|
# Now on https://warandpeas.com |
| 2502 |
|
name = 'lins' |
| 2503 |
|
long_name = 'L.I.N.S. Editions' |
| 2504 |
|
url = 'https://linsedition.com' |
| 2505 |
|
_categories = ('WARANDPEAS', 'LINS') |
| 2506 |
|
|
| 2507 |
|
|
| 2508 |
|
class WarAndPeas(GenericNavigableComic): |
|
@@ 1879-1904 (lines=26) @@
|
| 1876 |
|
class SafelyEndangered(GenericNavigableComic): |
| 1877 |
|
"""Class to retrieve Safely Endangered comics.""" |
| 1878 |
|
# Also on http://tumblr.safelyendangered.com |
| 1879 |
|
name = 'endangered' |
| 1880 |
|
long_name = 'Safely Endangered' |
| 1881 |
|
url = 'http://www.safelyendangered.com' |
| 1882 |
|
get_navi_link = get_link_rel_next |
| 1883 |
|
get_first_comic_link = simulate_first_link |
| 1884 |
|
first_url = 'http://www.safelyendangered.com/comic/ignored/' |
| 1885 |
|
|
| 1886 |
|
@classmethod |
| 1887 |
|
def get_comic_info(cls, soup, link): |
| 1888 |
|
"""Get information about a particular comics.""" |
| 1889 |
|
title = soup.find('h2', class_='post-title').string |
| 1890 |
|
date_str = soup.find('span', class_='post-date').string |
| 1891 |
|
day = string_to_date(date_str, '%B %d, %Y') |
| 1892 |
|
imgs = soup.find('div', id='comic').find_all('img') |
| 1893 |
|
alt = imgs[0]['alt'] |
| 1894 |
|
assert all(i['alt'] == i['title'] for i in imgs) |
| 1895 |
|
return { |
| 1896 |
|
'day': day.day, |
| 1897 |
|
'month': day.month, |
| 1898 |
|
'year': day.year, |
| 1899 |
|
'img': [i['src'] for i in imgs], |
| 1900 |
|
'title': title, |
| 1901 |
|
'alt': alt, |
| 1902 |
|
} |
| 1903 |
|
|
| 1904 |
|
|
| 1905 |
|
class PicturesInBoxes(GenericNavigableComic): |
| 1906 |
|
"""Class to retrieve Pictures In Boxes comics.""" |
| 1907 |
|
# Also on https://picturesinboxescomic.tumblr.com |
|
@@ 2371-2395 (lines=25) @@
|
| 2368 |
|
} |
| 2369 |
|
|
| 2370 |
|
|
| 2371 |
|
class RandomCrab(GenericNavigableComic): |
| 2372 |
|
"""Class to retrieve Random Crab comics.""" |
| 2373 |
|
name = 'randomcrab' |
| 2374 |
|
long_name = 'Random Crab' |
| 2375 |
|
url = 'https://randomcrab.com' |
| 2376 |
|
get_navi_link = get_a_rel_next |
| 2377 |
|
get_first_comic_link = navigate_to_first_comic |
| 2378 |
|
|
| 2379 |
|
@classmethod |
| 2380 |
|
def get_comic_info(cls, soup, link): |
| 2381 |
|
"""Get information about a particular comics.""" |
| 2382 |
|
title = soup.find('meta', property='og:title')['content'] |
| 2383 |
|
desc = soup.find('meta', property='og:description')['content'] |
| 2384 |
|
date_str = soup.find('meta', property='article:published_time')['content'][:10] |
| 2385 |
|
day = string_to_date(date_str, "%Y-%m-%d") |
| 2386 |
|
imgs = soup.find_all('meta', property='og:image') |
| 2387 |
|
author = soup.find('a', rel='author').string |
| 2388 |
|
return { |
| 2389 |
|
'title': title, |
| 2390 |
|
'desc': desc, |
| 2391 |
|
'img': [i['content'] for i in imgs], |
| 2392 |
|
'month': day.month, |
| 2393 |
|
'year': day.year, |
| 2394 |
|
'day': day.day, |
| 2395 |
|
'author': author, |
| 2396 |
|
} |
| 2397 |
|
|
| 2398 |
|
|