@@ 1855-1881 (lines=27) @@ | ||
1852 | } |
|
1853 | ||
1854 | ||
1855 | class PicturesInBoxes(GenericNavigableComic): |
|
1856 | """Class to retrieve Pictures In Boxes comics.""" |
|
1857 | # Also on https://picturesinboxescomic.tumblr.com |
|
1858 | name = 'picturesinboxes' |
|
1859 | long_name = 'Pictures in Boxes' |
|
1860 | url = 'http://www.picturesinboxes.com' |
|
1861 | get_navi_link = get_a_navi_navinext |
|
1862 | get_first_comic_link = simulate_first_link |
|
1863 | first_url = 'http://www.picturesinboxes.com/2013/10/26/tetris/' |
|
1864 | ||
1865 | @classmethod |
|
1866 | def get_comic_info(cls, soup, link): |
|
1867 | """Get information about a particular comics.""" |
|
1868 | title = soup.find('h2', class_='post-title').string |
|
1869 | author = soup.find("span", class_="post-author").find("a").string |
|
1870 | date_str = soup.find('span', class_='post-date').string |
|
1871 | day = string_to_date(date_str, '%B %d, %Y') |
|
1872 | imgs = soup.find('div', class_='comicpane').find_all('img') |
|
1873 | assert imgs |
|
1874 | assert all(i['title'] == i['alt'] == title for i in imgs) |
|
1875 | return { |
|
1876 | 'day': day.day, |
|
1877 | 'month': day.month, |
|
1878 | 'year': day.year, |
|
1879 | 'img': [i['src'] for i in imgs], |
|
1880 | 'title': title, |
|
1881 | 'author': author, |
|
1882 | } |
|
1883 | ||
1884 | ||
@@ 2809-2833 (lines=25) @@ | ||
2806 | first_url = 'http://www.commitstrip.com/en/2012/02/22/interview/' |
|
2807 | ||
2808 | ||
2809 | class GenericBoumerie(GenericNavigableComic): |
|
2810 | """Generic class to retrieve Boumeries comics in different languages.""" |
|
2811 | # Also on http://boumeries.tumblr.com |
|
2812 | get_first_comic_link = get_a_navi_navifirst |
|
2813 | get_navi_link = get_link_rel_next |
|
2814 | date_format = NotImplemented |
|
2815 | lang = NotImplemented |
|
2816 | ||
2817 | @classmethod |
|
2818 | def get_comic_info(cls, soup, link): |
|
2819 | """Get information about a particular comics.""" |
|
2820 | title = soup.find('h2', class_='post-title').string |
|
2821 | short_url = soup.find('link', rel='shortlink')['href'] |
|
2822 | author = soup.find("span", class_="post-author").find("a").string |
|
2823 | date_str = soup.find('span', class_='post-date').string |
|
2824 | day = string_to_date(date_str, cls.date_format, cls.lang) |
|
2825 | imgs = soup.find('div', id='comic').find_all('img') |
|
2826 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2827 | return { |
|
2828 | 'short_url': short_url, |
|
2829 | 'img': [i['src'] for i in imgs], |
|
2830 | 'title': title, |
|
2831 | 'author': author, |
|
2832 | 'month': day.month, |
|
2833 | 'year': day.year, |
|
2834 | 'day': day.day, |
|
2835 | } |
|
2836 | ||
@@ 2555-2580 (lines=26) @@ | ||
2552 | } |
|
2553 | ||
2554 | ||
2555 | class TheAwkwardYeti(GenericNavigableComic): |
|
2556 | """Class to retrieve The Awkward Yeti comics.""" |
|
2557 | # Also on http://www.gocomics.com/the-awkward-yeti |
|
2558 | # Also on http://larstheyeti.tumblr.com |
|
2559 | # Also on https://tapastic.com/series/TheAwkwardYeti |
|
2560 | name = 'yeti' |
|
2561 | long_name = 'The Awkward Yeti' |
|
2562 | url = 'http://theawkwardyeti.com' |
|
2563 | _categories = ('YETI', ) |
|
2564 | get_first_comic_link = get_a_navi_navifirst |
|
2565 | get_navi_link = get_link_rel_next |
|
2566 | ||
2567 | @classmethod |
|
2568 | def get_comic_info(cls, soup, link): |
|
2569 | """Get information about a particular comics.""" |
|
2570 | title = soup.find('h2', class_='post-title').string |
|
2571 | date_str = soup.find("span", class_="post-date").string |
|
2572 | day = string_to_date(date_str, "%B %d, %Y") |
|
2573 | imgs = soup.find("div", id="comic").find_all("img") |
|
2574 | assert all(idx > 0 or i['alt'] == i['title'] for idx, i in enumerate(imgs)) |
|
2575 | return { |
|
2576 | 'img': [i['src'] for i in imgs], |
|
2577 | 'title': title, |
|
2578 | 'day': day.day, |
|
2579 | 'month': day.month, |
|
2580 | 'year': day.year |
|
2581 | } |
|
2582 | ||
2583 | ||
@@ 2468-2493 (lines=26) @@ | ||
2465 | } |
|
2466 | ||
2467 | ||
2468 | class GerbilWithAJetpack(GenericNavigableComic): |
|
2469 | """Class to retrieve GerbilWithAJetpack comics.""" |
|
2470 | name = 'gerbil' |
|
2471 | long_name = 'Gerbil With A Jetpack' |
|
2472 | url = 'http://gerbilwithajetpack.com' |
|
2473 | get_first_comic_link = get_a_navi_navifirst |
|
2474 | get_navi_link = get_a_rel_next |
|
2475 | ||
2476 | @classmethod |
|
2477 | def get_comic_info(cls, soup, link): |
|
2478 | """Get information about a particular comics.""" |
|
2479 | title = soup.find('h2', class_='post-title').string |
|
2480 | author = soup.find("span", class_="post-author").find("a").string |
|
2481 | date_str = soup.find("span", class_="post-date").string |
|
2482 | day = string_to_date(date_str, "%B %d, %Y") |
|
2483 | imgs = soup.find("div", id="comic").find_all("img") |
|
2484 | alt = imgs[0]['alt'] |
|
2485 | assert all(i['alt'] == i['title'] == alt for i in imgs) |
|
2486 | return { |
|
2487 | 'img': [i['src'] for i in imgs], |
|
2488 | 'title': title, |
|
2489 | 'alt': alt, |
|
2490 | 'author': author, |
|
2491 | 'day': day.day, |
|
2492 | 'month': day.month, |
|
2493 | 'year': day.year |
|
2494 | } |
|
2495 | ||
2496 | ||
@@ 2497-2521 (lines=25) @@ | ||
2494 | } |
|
2495 | ||
2496 | ||
2497 | class EveryDayBlues(GenericDeletedComic, GenericNavigableComic): |
|
2498 | """Class to retrieve EveryDayBlues Comics.""" |
|
2499 | name = "blues" |
|
2500 | long_name = "Every Day Blues" |
|
2501 | url = "http://everydayblues.net" |
|
2502 | get_first_comic_link = get_a_navi_navifirst |
|
2503 | get_navi_link = get_link_rel_next |
|
2504 | ||
2505 | @classmethod |
|
2506 | def get_comic_info(cls, soup, link): |
|
2507 | """Get information about a particular comics.""" |
|
2508 | title = soup.find("h2", class_="post-title").string |
|
2509 | author = soup.find("span", class_="post-author").find("a").string |
|
2510 | date_str = soup.find("span", class_="post-date").string |
|
2511 | day = string_to_date(date_str, "%d. %B %Y", "de_DE.utf8") |
|
2512 | imgs = soup.find("div", id="comic").find_all("img") |
|
2513 | assert all(i['alt'] == i['title'] == title for i in imgs) |
|
2514 | assert len(imgs) <= 1, imgs |
|
2515 | return { |
|
2516 | 'img': [i['src'] for i in imgs], |
|
2517 | 'title': title, |
|
2518 | 'author': author, |
|
2519 | 'day': day.day, |
|
2520 | 'month': day.month, |
|
2521 | 'year': day.year |
|
2522 | } |
|
2523 | ||
2524 | ||
@@ 1743-1767 (lines=25) @@ | ||
1740 | } |
|
1741 | ||
1742 | ||
1743 | class MouseBearComedy(GenericComicNotWorking): # Website has changed |
|
1744 | """Class to retrieve Mouse Bear Comedy comics.""" |
|
1745 | # Also on http://mousebearcomedy.tumblr.com |
|
1746 | name = 'mousebear' |
|
1747 | long_name = 'Mouse Bear Comedy' |
|
1748 | url = 'http://www.mousebearcomedy.com' |
|
1749 | get_first_comic_link = get_a_navi_navifirst |
|
1750 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
1751 | ||
1752 | @classmethod |
|
1753 | def get_comic_info(cls, soup, link): |
|
1754 | """Get information about a particular comics.""" |
|
1755 | title = soup.find('h2', class_='post-title').string |
|
1756 | author = soup.find("span", class_="post-author").find("a").string |
|
1757 | date_str = soup.find("span", class_="post-date").string |
|
1758 | day = string_to_date(date_str, '%B %d, %Y') |
|
1759 | imgs = soup.find("div", id="comic").find_all("img") |
|
1760 | assert all(i['alt'] == i['title'] == title for i in imgs) |
|
1761 | return { |
|
1762 | 'day': day.day, |
|
1763 | 'month': day.month, |
|
1764 | 'year': day.year, |
|
1765 | 'img': [i['src'] for i in imgs], |
|
1766 | 'title': title, |
|
1767 | 'author': author, |
|
1768 | } |
|
1769 | ||
1770 | ||
@@ 1187-1210 (lines=24) @@ | ||
1184 | url = 'http://english.bouletcorp.com' |
|
1185 | ||
1186 | ||
1187 | class AmazingSuperPowers(GenericNavigableComic): |
|
1188 | """Class to retrieve Amazing Super Powers comics.""" |
|
1189 | name = 'asp' |
|
1190 | long_name = 'Amazing Super Powers' |
|
1191 | url = 'http://www.amazingsuperpowers.com' |
|
1192 | get_first_comic_link = get_a_navi_navifirst |
|
1193 | get_navi_link = get_a_navi_navinext |
|
1194 | ||
1195 | @classmethod |
|
1196 | def get_comic_info(cls, soup, link): |
|
1197 | """Get information about a particular comics.""" |
|
1198 | author = soup.find("span", class_="post-author").find("a").string |
|
1199 | date_str = soup.find('span', class_='post-date').string |
|
1200 | day = string_to_date(date_str, "%B %d, %Y") |
|
1201 | imgs = soup.find('div', id='comic').find_all('img') |
|
1202 | title = ' '.join(i['title'] for i in imgs) |
|
1203 | assert all(i['alt'] == i['title'] for i in imgs) |
|
1204 | return { |
|
1205 | 'title': title, |
|
1206 | 'author': author, |
|
1207 | 'img': [img['src'] for img in imgs], |
|
1208 | 'day': day.day, |
|
1209 | 'month': day.month, |
|
1210 | 'year': day.year |
|
1211 | } |
|
1212 | ||
1213 | ||
@@ 704-727 (lines=24) @@ | ||
701 | } |
|
702 | ||
703 | ||
704 | class OneOneOneOneComic(GenericComicNotWorking, GenericNavigableComic): |
|
705 | """Class to retrieve 1111 Comics.""" |
|
706 | # Also on http://comics1111.tumblr.com |
|
707 | # Also on https://tapastic.com/series/1111-Comics |
|
708 | name = '1111' |
|
709 | long_name = '1111 Comics' |
|
710 | url = 'http://www.1111comics.me' |
|
711 | _categories = ('ONEONEONEONE', ) |
|
712 | get_first_comic_link = get_div_navfirst_a |
|
713 | get_navi_link = get_link_rel_next |
|
714 | ||
715 | @classmethod |
|
716 | def get_comic_info(cls, soup, link): |
|
717 | """Get information about a particular comics.""" |
|
718 | title = soup.find('h1', class_='comic-title').find('a').string |
|
719 | date_str = soup.find('header', class_='comic-meta entry-meta').find('a').string |
|
720 | day = string_to_date(date_str, "%B %d, %Y") |
|
721 | imgs = soup.find_all('meta', property='og:image') |
|
722 | return { |
|
723 | 'title': title, |
|
724 | 'month': day.month, |
|
725 | 'year': day.year, |
|
726 | 'day': day.day, |
|
727 | 'img': [i['content'] for i in imgs], |
|
728 | } |
|
729 | ||
730 | ||
@@ 932-954 (lines=23) @@ | ||
929 | } |
|
930 | ||
931 | ||
932 | class TheGentlemanArmchair(GenericNavigableComic): |
|
933 | """Class to retrieve The Gentleman Armchair comics.""" |
|
934 | name = 'gentlemanarmchair' |
|
935 | long_name = 'The Gentleman Armchair' |
|
936 | url = 'http://thegentlemansarmchair.com' |
|
937 | get_first_comic_link = get_a_navi_navifirst |
|
938 | get_navi_link = get_link_rel_next |
|
939 | ||
940 | @classmethod |
|
941 | def get_comic_info(cls, soup, link): |
|
942 | """Get information about a particular comics.""" |
|
943 | title = soup.find('h2', class_='post-title').string |
|
944 | author = soup.find("span", class_="post-author").find("a").string |
|
945 | date_str = soup.find('span', class_='post-date').string |
|
946 | day = string_to_date(date_str, "%B %d, %Y") |
|
947 | imgs = soup.find('div', id='comic').find_all('img') |
|
948 | return { |
|
949 | 'img': [i['src'] for i in imgs], |
|
950 | 'title': title, |
|
951 | 'author': author, |
|
952 | 'month': day.month, |
|
953 | 'year': day.year, |
|
954 | 'day': day.day, |
|
955 | } |
|
956 | ||
957 | ||
@@ 731-752 (lines=22) @@ | ||
728 | } |
|
729 | ||
730 | ||
731 | class AngryAtNothing(GenericDeletedComic, GenericNavigableComic): |
|
732 | """Class to retrieve Angry at Nothing comics.""" |
|
733 | # Also on http://tapastic.com/series/Comics-yeah-definitely-comics- |
|
734 | # Also on http://angryatnothing.tumblr.com |
|
735 | name = 'angry' |
|
736 | long_name = 'Angry At Nothing' |
|
737 | url = 'http://www.angryatnothing.net' |
|
738 | get_first_comic_link = get_div_navfirst_a |
|
739 | get_navi_link = get_a_rel_next |
|
740 | ||
741 | @classmethod |
|
742 | def get_comic_info(cls, soup, link): |
|
743 | """Get information about a particular comics.""" |
|
744 | title = soup.find('h1', class_='comic-title').find('a').string |
|
745 | date_str = soup.find('header', class_='comic-meta entry-meta').find('a').string |
|
746 | day = string_to_date(date_str, "%B %d, %Y") |
|
747 | imgs = soup.find_all('meta', property='og:image') |
|
748 | return { |
|
749 | 'title': title, |
|
750 | 'month': day.month, |
|
751 | 'year': day.year, |
|
752 | 'day': day.day, |
|
753 | 'img': [i['content'] for i in imgs], |
|
754 | } |
|
755 | ||
@@ 2666-2694 (lines=29) @@ | ||
2663 | } |
|
2664 | ||
2665 | ||
2666 | class TalesOfAbsurdity(GenericNavigableComic): |
|
2667 | """Class to retrieve Tales Of Absurdity comics.""" |
|
2668 | # Also on http://tapastic.com/series/Tales-Of-Absurdity |
|
2669 | # Also on http://talesofabsurdity.tumblr.com |
|
2670 | name = 'absurdity' |
|
2671 | long_name = 'Tales of Absurdity' |
|
2672 | url = 'http://talesofabsurdity.com' |
|
2673 | _categories = ('ABSURDITY', ) |
|
2674 | get_first_comic_link = get_a_navi_navifirst |
|
2675 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
2676 | ||
2677 | @classmethod |
|
2678 | def get_comic_info(cls, soup, link): |
|
2679 | """Get information about a particular comics.""" |
|
2680 | title = soup.find('h2', class_='post-title').string |
|
2681 | author = soup.find("span", class_="post-author").find("a").string |
|
2682 | date_str = soup.find("span", class_="post-date").string |
|
2683 | day = string_to_date(date_str, "%B %d, %Y") |
|
2684 | imgs = soup.find("div", id="comic").find_all("img") |
|
2685 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2686 | alt = imgs[0]['alt'] if imgs else "" |
|
2687 | return { |
|
2688 | 'img': [i['src'] for i in imgs], |
|
2689 | 'title': title, |
|
2690 | 'alt': alt, |
|
2691 | 'author': author, |
|
2692 | 'day': day.day, |
|
2693 | 'month': day.month, |
|
2694 | 'year': day.year |
|
2695 | } |
|
2696 | ||
2697 | ||
@@ 2604-2632 (lines=29) @@ | ||
2601 | } |
|
2602 | ||
2603 | ||
2604 | class MisterAndMe(GenericNavigableComic): |
|
2605 | """Class to retrieve Mister & Me Comics.""" |
|
2606 | # Also on http://www.gocomics.com/mister-and-me |
|
2607 | # Also on https://tapastic.com/series/Mister-and-Me |
|
2608 | name = 'mister' |
|
2609 | long_name = 'Mister & Me' |
|
2610 | url = 'http://www.mister-and-me.com' |
|
2611 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2612 | get_navi_link = get_link_rel_next |
|
2613 | ||
2614 | @classmethod |
|
2615 | def get_comic_info(cls, soup, link): |
|
2616 | """Get information about a particular comics.""" |
|
2617 | title = soup.find('h2', class_='post-title').string |
|
2618 | author = soup.find("span", class_="post-author").find("a").string |
|
2619 | date_str = soup.find("span", class_="post-date").string |
|
2620 | day = string_to_date(date_str, "%B %d, %Y") |
|
2621 | imgs = soup.find("div", id="comic").find_all("img") |
|
2622 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2623 | assert len(imgs) <= 1, imgs |
|
2624 | alt = imgs[0]['alt'] if imgs else "" |
|
2625 | return { |
|
2626 | 'img': [i['src'] for i in imgs], |
|
2627 | 'title': title, |
|
2628 | 'alt': alt, |
|
2629 | 'author': author, |
|
2630 | 'day': day.day, |
|
2631 | 'month': day.month, |
|
2632 | 'year': day.year |
|
2633 | } |
|
2634 | ||
2635 | ||
@@ 2892-2918 (lines=27) @@ | ||
2889 | } |
|
2890 | ||
2891 | ||
2892 | class Optipess(GenericNavigableComic): |
|
2893 | """Class to retrieve Optipess comics.""" |
|
2894 | name = 'optipess' |
|
2895 | long_name = 'Optipess' |
|
2896 | url = 'http://www.optipess.com' |
|
2897 | get_first_comic_link = get_a_navi_navifirst |
|
2898 | get_navi_link = get_link_rel_next |
|
2899 | ||
2900 | @classmethod |
|
2901 | def get_comic_info(cls, soup, link): |
|
2902 | """Get information about a particular comics.""" |
|
2903 | title = soup.find('h2', class_='post-title').string |
|
2904 | author = soup.find("span", class_="post-author").find("a").string |
|
2905 | comic = soup.find('div', id='comic') |
|
2906 | imgs = comic.find_all('img') if comic else [] |
|
2907 | alt = imgs[0]['title'] if imgs else "" |
|
2908 | assert all(i['alt'] == i['title'] == alt for i in imgs) |
|
2909 | date_str = soup.find('span', class_='post-date').string |
|
2910 | day = string_to_date(date_str, "%B %d, %Y") |
|
2911 | return { |
|
2912 | 'title': title, |
|
2913 | 'alt': alt, |
|
2914 | 'author': author, |
|
2915 | 'img': [i['src'] for i in imgs], |
|
2916 | 'month': day.month, |
|
2917 | 'year': day.year, |
|
2918 | 'day': day.day, |
|
2919 | } |
|
2920 | ||
2921 | ||
@@ 2636-2662 (lines=27) @@ | ||
2633 | } |
|
2634 | ||
2635 | ||
2636 | class LastPlaceComics(GenericNavigableComic): |
|
2637 | """Class to retrieve Last Place Comics.""" |
|
2638 | name = 'lastplace' |
|
2639 | long_name = 'Last Place Comics' |
|
2640 | url = "http://lastplacecomics.com" |
|
2641 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
2642 | get_navi_link = get_link_rel_next |
|
2643 | ||
2644 | @classmethod |
|
2645 | def get_comic_info(cls, soup, link): |
|
2646 | """Get information about a particular comics.""" |
|
2647 | title = soup.find('h2', class_='post-title').string |
|
2648 | author = soup.find("span", class_="post-author").find("a").string |
|
2649 | date_str = soup.find("span", class_="post-date").string |
|
2650 | day = string_to_date(date_str, "%B %d, %Y") |
|
2651 | imgs = soup.find("div", id="comic").find_all("img") |
|
2652 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2653 | assert len(imgs) <= 1, imgs |
|
2654 | alt = imgs[0]['alt'] if imgs else "" |
|
2655 | return { |
|
2656 | 'img': [i['src'] for i in imgs], |
|
2657 | 'title': title, |
|
2658 | 'alt': alt, |
|
2659 | 'author': author, |
|
2660 | 'day': day.day, |
|
2661 | 'month': day.month, |
|
2662 | 'year': day.year |
|
2663 | } |
|
2664 | ||
2665 | ||
@@ 2525-2551 (lines=27) @@ | ||
2522 | } |
|
2523 | ||
2524 | ||
2525 | class BiterComics(GenericNavigableComic): |
|
2526 | """Class to retrieve Biter Comics.""" |
|
2527 | name = "biter" |
|
2528 | long_name = "Biter Comics" |
|
2529 | url = "http://www.bitercomics.com" |
|
2530 | get_first_comic_link = get_a_navi_navifirst |
|
2531 | get_navi_link = get_link_rel_next |
|
2532 | ||
2533 | @classmethod |
|
2534 | def get_comic_info(cls, soup, link): |
|
2535 | """Get information about a particular comics.""" |
|
2536 | title = soup.find("h1", class_="entry-title").string |
|
2537 | author = soup.find("span", class_="author vcard").find("a").string |
|
2538 | date_str = soup.find("span", class_="entry-date").string |
|
2539 | day = string_to_date(date_str, "%B %d, %Y") |
|
2540 | imgs = soup.find("div", id="comic").find_all("img") |
|
2541 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2542 | assert len(imgs) == 1, imgs |
|
2543 | alt = imgs[0]['alt'] |
|
2544 | return { |
|
2545 | 'img': [i['src'] for i in imgs], |
|
2546 | 'title': title, |
|
2547 | 'alt': alt, |
|
2548 | 'author': author, |
|
2549 | 'day': day.day, |
|
2550 | 'month': day.month, |
|
2551 | 'year': day.year |
|
2552 | } |
|
2553 | ||
2554 | ||
@@ 2000-2026 (lines=27) @@ | ||
1997 | _categories = ('TUNEYTOONS', ) |
|
1998 | ||
1999 | ||
2000 | class CompletelySeriousComics(GenericNavigableComic): |
|
2001 | """Class to retrieve Completely Serious comics.""" |
|
2002 | name = 'completelyserious' |
|
2003 | long_name = 'Completely Serious Comics' |
|
2004 | url = 'http://completelyseriouscomics.com' |
|
2005 | get_first_comic_link = get_a_navi_navifirst |
|
2006 | get_navi_link = get_a_navi_navinext |
|
2007 | ||
2008 | @classmethod |
|
2009 | def get_comic_info(cls, soup, link): |
|
2010 | """Get information about a particular comics.""" |
|
2011 | title = soup.find('h2', class_='post-title').string |
|
2012 | author = soup.find('span', class_='post-author').contents[1].string |
|
2013 | date_str = soup.find('span', class_='post-date').string |
|
2014 | day = string_to_date(date_str, '%B %d, %Y') |
|
2015 | imgs = soup.find('div', class_='comicpane').find_all('img') |
|
2016 | assert imgs |
|
2017 | alt = imgs[0]['title'] |
|
2018 | assert all(i['title'] == i['alt'] == alt for i in imgs) |
|
2019 | return { |
|
2020 | 'month': day.month, |
|
2021 | 'year': day.year, |
|
2022 | 'day': day.day, |
|
2023 | 'img': [i['src'] for i in imgs], |
|
2024 | 'title': title, |
|
2025 | 'alt': alt, |
|
2026 | 'author': author, |
|
2027 | } |
|
2028 | ||
2029 | ||
@@ 2698-2723 (lines=26) @@ | ||
2695 | } |
|
2696 | ||
2697 | ||
2698 | class EndlessOrigami(GenericComicNotWorking, GenericNavigableComic): # Nav not working |
|
2699 | """Class to retrieve Endless Origami Comics.""" |
|
2700 | name = "origami" |
|
2701 | long_name = "Endless Origami" |
|
2702 | url = "http://endlessorigami.com" |
|
2703 | get_first_comic_link = get_a_navi_navifirst |
|
2704 | get_navi_link = get_link_rel_next |
|
2705 | ||
2706 | @classmethod |
|
2707 | def get_comic_info(cls, soup, link): |
|
2708 | """Get information about a particular comics.""" |
|
2709 | title = soup.find('h2', class_='post-title').string |
|
2710 | author = soup.find("span", class_="post-author").find("a").string |
|
2711 | date_str = soup.find("span", class_="post-date").string |
|
2712 | day = string_to_date(date_str, "%B %d, %Y") |
|
2713 | imgs = soup.find("div", id="comic").find_all("img") |
|
2714 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2715 | alt = imgs[0]['alt'] if imgs else "" |
|
2716 | return { |
|
2717 | 'img': [i['src'] for i in imgs], |
|
2718 | 'title': title, |
|
2719 | 'alt': alt, |
|
2720 | 'author': author, |
|
2721 | 'day': day.day, |
|
2722 | 'month': day.month, |
|
2723 | 'year': day.year |
|
2724 | } |
|
2725 | ||
2726 | ||
@@ 2211-2236 (lines=26) @@ | ||
2208 | return reversed(get_soup_at_url(archive_url).find('tbody').find_all('tr')) |
|
2209 | ||
2210 | ||
2211 | class HappleTea(GenericNavigableComic): |
|
2212 | """Class to retrieve Happle Tea Comics.""" |
|
2213 | name = 'happletea' |
|
2214 | long_name = 'Happle Tea' |
|
2215 | url = 'http://www.happletea.com' |
|
2216 | get_first_comic_link = get_a_navi_navifirst |
|
2217 | get_navi_link = get_link_rel_next |
|
2218 | ||
2219 | @classmethod |
|
2220 | def get_comic_info(cls, soup, link): |
|
2221 | """Get information about a particular comics.""" |
|
2222 | imgs = soup.find('div', id='comic').find_all('img') |
|
2223 | post = soup.find('div', class_='post-content') |
|
2224 | title = post.find('h2', class_='post-title').string |
|
2225 | author = post.find('a', rel='author').string |
|
2226 | date_str = post.find('span', class_='post-date').string |
|
2227 | day = string_to_date(date_str, "%B %d, %Y") |
|
2228 | assert all(i['alt'] == i['title'] for i in imgs) |
|
2229 | return { |
|
2230 | 'title': title, |
|
2231 | 'img': [i['src'] for i in imgs], |
|
2232 | 'alt': ''.join(i['alt'] for i in imgs), |
|
2233 | 'month': day.month, |
|
2234 | 'year': day.year, |
|
2235 | 'day': day.day, |
|
2236 | 'author': author, |
|
2237 | } |
|
2238 | ||
2239 | ||
@@ 1885-1910 (lines=26) @@ | ||
1882 | } |
|
1883 | ||
1884 | ||
1885 | class Penmen(GenericComicNotWorking, GenericNavigableComic): |
|
1886 | """Class to retrieve Penmen comics.""" |
|
1887 | name = 'penmen' |
|
1888 | long_name = 'Penmen' |
|
1889 | url = 'http://penmen.com' |
|
1890 | get_navi_link = get_link_rel_next |
|
1891 | get_first_comic_link = simulate_first_link |
|
1892 | first_url = 'http://penmen.com/index.php/2016/09/12/penmen-announces-grin-big-brand-clothing/' |
|
1893 | ||
1894 | @classmethod |
|
1895 | def get_comic_info(cls, soup, link): |
|
1896 | """Get information about a particular comics.""" |
|
1897 | title = soup.find('title').string |
|
1898 | imgs = soup.find('div', class_='entry-content').find_all('img') |
|
1899 | short_url = soup.find('link', rel='shortlink')['href'] |
|
1900 | tags = ' '.join(t.string for t in soup.find_all('a', rel='tag')) |
|
1901 | date_str = soup.find('time')['datetime'][:10] |
|
1902 | day = string_to_date(date_str, "%Y-%m-%d") |
|
1903 | return { |
|
1904 | 'title': title, |
|
1905 | 'short_url': short_url, |
|
1906 | 'img': [i['src'] for i in imgs], |
|
1907 | 'tags': tags, |
|
1908 | 'month': day.month, |
|
1909 | 'year': day.year, |
|
1910 | 'day': day.day, |
|
1911 | } |
|
1912 | ||
1913 | ||
@@ 2367-2391 (lines=25) @@ | ||
2364 | } |
|
2365 | ||
2366 | ||
2367 | class LonnieMillsap(GenericNavigableComic): |
|
2368 | """Class to retrieve Lonnie Millsap's comics.""" |
|
2369 | name = 'millsap' |
|
2370 | long_name = 'Lonnie Millsap' |
|
2371 | url = 'http://www.lonniemillsap.com' |
|
2372 | get_navi_link = get_link_rel_next |
|
2373 | get_first_comic_link = simulate_first_link |
|
2374 | first_url = 'http://www.lonniemillsap.com/?p=42' |
|
2375 | ||
2376 | @classmethod |
|
2377 | def get_comic_info(cls, soup, link): |
|
2378 | """Get information about a particular comics.""" |
|
2379 | title = soup.find('h2', class_='post-title').string |
|
2380 | post = soup.find('div', class_='post-content') |
|
2381 | author = post.find("span", class_="post-author").find("a").string |
|
2382 | date_str = post.find("span", class_="post-date").string |
|
2383 | day = string_to_date(date_str, "%B %d, %Y") |
|
2384 | imgs = post.find("div", class_="entry").find_all("img") |
|
2385 | return { |
|
2386 | 'title': title, |
|
2387 | 'author': author, |
|
2388 | 'img': [i['src'] for i in imgs], |
|
2389 | 'month': day.month, |
|
2390 | 'year': day.year, |
|
2391 | 'day': day.day, |
|
2392 | } |
|
2393 | ||
2394 | ||
@@ 2088-2112 (lines=25) @@ | ||
2085 | } |
|
2086 | ||
2087 | ||
2088 | class ChuckleADuck(GenericNavigableComic): |
|
2089 | """Class to retrieve Chuckle-A-Duck comics.""" |
|
2090 | name = 'chuckleaduck' |
|
2091 | long_name = 'Chuckle-A-duck' |
|
2092 | url = 'http://chuckleaduck.com' |
|
2093 | get_first_comic_link = get_div_navfirst_a |
|
2094 | get_navi_link = get_link_rel_next |
|
2095 | ||
2096 | @classmethod |
|
2097 | def get_comic_info(cls, soup, link): |
|
2098 | """Get information about a particular comics.""" |
|
2099 | date_str = soup.find('span', class_='post-date').string |
|
2100 | day = string_to_date(remove_st_nd_rd_th_from_date(date_str), "%B %d, %Y") |
|
2101 | author = soup.find('span', class_='post-author').string |
|
2102 | div = soup.find('div', id='comic') |
|
2103 | imgs = div.find_all('img') if div else [] |
|
2104 | title = imgs[0]['title'] if imgs else "" |
|
2105 | assert all(i['title'] == i['alt'] == title for i in imgs) |
|
2106 | return { |
|
2107 | 'month': day.month, |
|
2108 | 'year': day.year, |
|
2109 | 'day': day.day, |
|
2110 | 'img': [i['src'] for i in imgs], |
|
2111 | 'title': title, |
|
2112 | 'author': author, |
|
2113 | } |
|
2114 | ||
2115 | ||
@@ 3220-3243 (lines=24) @@ | ||
3217 | } |
|
3218 | ||
3219 | ||
3220 | class Ubertool(GenericNavigableComic): |
|
3221 | """Class to retrieve Ubertool comics.""" |
|
3222 | # Also on https://ubertool.tumblr.com |
|
3223 | # Also on https://tapastic.com/series/ubertool |
|
3224 | name = 'ubertool' |
|
3225 | long_name = 'Ubertool' |
|
3226 | url = 'http://ubertoolcomic.com' |
|
3227 | _categories = ('UBERTOOL', ) |
|
3228 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
3229 | get_navi_link = get_a_comicnavbase_comicnavnext |
|
3230 | ||
3231 | @classmethod |
|
3232 | def get_comic_info(cls, soup, link): |
|
3233 | """Get information about a particular comics.""" |
|
3234 | title = soup.find('h2', class_='post-title').string |
|
3235 | date_str = soup.find('span', class_='post-date').string |
|
3236 | day = string_to_date(date_str, "%B %d, %Y") |
|
3237 | imgs = soup.find('div', id='comic').find_all('img') |
|
3238 | return { |
|
3239 | 'img': [i['src'] for i in imgs], |
|
3240 | 'title': title, |
|
3241 | 'month': day.month, |
|
3242 | 'year': day.year, |
|
3243 | 'day': day.day, |
|
3244 | } |
|
3245 | ||
3246 | ||
@@ 678-700 (lines=23) @@ | ||
675 | } |
|
676 | ||
677 | ||
678 | class PenelopeBagieu(GenericNavigableComic): |
|
679 | """Class to retrieve comics from Penelope Bagieu's blog.""" |
|
680 | name = 'bagieu' |
|
681 | long_name = 'Ma vie est tout a fait fascinante (Bagieu)' |
|
682 | url = 'http://www.penelope-jolicoeur.com' |
|
683 | _categories = ('FRANCAIS', ) |
|
684 | get_navi_link = get_link_rel_next |
|
685 | get_first_comic_link = simulate_first_link |
|
686 | first_url = 'http://www.penelope-jolicoeur.com/2007/02/ma-vie-mon-oeuv.html' |
|
687 | ||
688 | @classmethod |
|
689 | def get_comic_info(cls, soup, link): |
|
690 | """Get information about a particular comics.""" |
|
691 | date_str = soup.find('h2', class_='date-header').string |
|
692 | day = string_to_date(date_str, "%A %d %B %Y", "fr_FR.utf8") |
|
693 | imgs = soup.find('div', class_='entry-body').find_all('img') |
|
694 | title = soup.find('h3', class_='entry-header').string |
|
695 | return { |
|
696 | 'title': title, |
|
697 | 'img': [i['src'] for i in imgs], |
|
698 | 'month': day.month, |
|
699 | 'year': day.year, |
|
700 | 'day': day.day, |
|
701 | } |
|
702 | ||
703 | ||
@@ 3493-3513 (lines=21) @@ | ||
3490 | } |
|
3491 | ||
3492 | ||
3493 | class Octopuns(GenericBlogspotComic): |
|
3494 | """Class to retrieve Octopuns comics.""" |
|
3495 | # Also on http://octopuns.tumblr.com |
|
3496 | name = 'octopuns' |
|
3497 | long_name = 'Octopuns' |
|
3498 | url = 'http://www.octopuns.net' # or http://octopuns.blogspot.fr/ |
|
3499 | first_url = 'http://octopuns.blogspot.com/2010/12/17122010-always-read-label.html' |
|
3500 | ||
3501 | @classmethod |
|
3502 | def get_comic_info(cls, soup, link): |
|
3503 | """Get information about a particular comics.""" |
|
3504 | title = soup.find('h3', class_='post-title entry-title').string |
|
3505 | date_str = soup.find('h2', class_='date-header').string |
|
3506 | day = string_to_date(date_str, "%A, %B %d, %Y") |
|
3507 | imgs = soup.find_all('link', rel='image_src') |
|
3508 | return { |
|
3509 | 'img': [i['href'] for i in imgs], |
|
3510 | 'title': title, |
|
3511 | 'day': day.day, |
|
3512 | 'month': day.month, |
|
3513 | 'year': day.year, |
|
3514 | } |
|
3515 | ||
3516 | ||
@@ 3177-3197 (lines=21) @@ | ||
3174 | } |
|
3175 | ||
3176 | ||
3177 | class ManVersusManatee(GenericNavigableComic): |
|
3178 | """Class to retrieve Man Versus Manatee comics.""" |
|
3179 | url = 'http://manvsmanatee.com' |
|
3180 | name = 'manvsmanatee' |
|
3181 | long_name = 'Man Versus Manatee' |
|
3182 | get_first_comic_link = get_a_comicnavbase_comicnavfirst |
|
3183 | get_navi_link = get_a_comicnavbase_comicnavnext |
|
3184 | ||
3185 | @classmethod |
|
3186 | def get_comic_info(cls, soup, link): |
|
3187 | """Get information about a particular comics.""" |
|
3188 | title = soup.find('h2', class_='post-title').string |
|
3189 | imgs = soup.find('div', id='comic').find_all('img') |
|
3190 | date_str = soup.find('span', class_='post-date').string |
|
3191 | day = string_to_date(date_str, "%B %d, %Y") |
|
3192 | return { |
|
3193 | 'img': [i['src'] for i in imgs], |
|
3194 | 'title': title, |
|
3195 | 'month': day.month, |
|
3196 | 'year': day.year, |
|
3197 | 'day': day.day, |
|
3198 | } |
|
3199 | ||
3200 | ||
@@ 2727-2747 (lines=21) @@ | ||
2724 | } |
|
2725 | ||
2726 | ||
2727 | class PlanC(GenericNavigableComic): |
|
2728 | """Class to retrieve Plan C comics.""" |
|
2729 | name = 'planc' |
|
2730 | long_name = 'Plan C' |
|
2731 | url = 'http://www.plancomic.com' |
|
2732 | get_first_comic_link = get_a_navi_navifirst |
|
2733 | get_navi_link = get_a_navi_comicnavnext_navinext |
|
2734 | ||
2735 | @classmethod |
|
2736 | def get_comic_info(cls, soup, link): |
|
2737 | """Get information about a particular comics.""" |
|
2738 | title = soup.find('h2', class_='post-title').string |
|
2739 | date_str = soup.find("span", class_="post-date").string |
|
2740 | day = string_to_date(date_str, "%B %d, %Y") |
|
2741 | imgs = soup.find('div', id='comic').find_all('img') |
|
2742 | return { |
|
2743 | 'title': title, |
|
2744 | 'img': [i['src'] for i in imgs], |
|
2745 | 'month': day.month, |
|
2746 | 'year': day.year, |
|
2747 | 'day': day.day, |
|
2748 | } |
|
2749 | ||
2750 | ||
@@ 1696-1716 (lines=21) @@ | ||
1693 | } |
|
1694 | ||
1695 | ||
1696 | class WarehouseComic(GenericNavigableComic): |
|
1697 | """Class to retrieve Warehouse Comic comics.""" |
|
1698 | name = 'warehouse' |
|
1699 | long_name = 'Warehouse Comic' |
|
1700 | url = 'http://warehousecomic.com' |
|
1701 | get_first_comic_link = get_a_navi_navifirst |
|
1702 | get_navi_link = get_link_rel_next |
|
1703 | ||
1704 | @classmethod |
|
1705 | def get_comic_info(cls, soup, link): |
|
1706 | """Get information about a particular comics.""" |
|
1707 | title = soup.find('h2', class_='post-title').string |
|
1708 | date_str = soup.find('span', class_='post-date').string |
|
1709 | day = string_to_date(date_str, "%B %d, %Y") |
|
1710 | imgs = soup.find('div', id='comic').find_all('img') |
|
1711 | return { |
|
1712 | 'img': [i['src'] for i in imgs], |
|
1713 | 'title': title, |
|
1714 | 'day': day.day, |
|
1715 | 'month': day.month, |
|
1716 | 'year': day.year, |
|
1717 | } |
|
1718 | ||
1719 |