# Path: cum/scrapers/base.py
# class BaseSeries(metaclass=ABCMeta):
# class BaseChapter(metaclass=ABCMeta):
#     def __init__(self, url, **kwargs):
#     def alias(self):
#     def follow(self, ignore=False):
#     def get_chapters(self):
#     def name(self):
#     def update(self):
#     def __init__(self, *args, **kwargs):
#     def _strip_unwanted_characters(self, path):
#     def _windows_name_directory(self, directory):
#     def available(self):
#     def create_directory(self, directory):
#     def create_zip(self, files):
#     def db_remove(self):
#     def download(self):
#     def filename(self):
#     def from_url(url):
#     def get(self, use_db=True):
#     def guess_extension(mime_type):
#     def ignore(self):
#     def mark_downloaded(self):
#     def mark_new(self):
#     def page_download_finish(bar, files, fs):
#     def page_download_task(page_num, r):
#     def progress_bar(self, arg):
#     def save(self, series, ignore=False):
#         KEEP_CHARACTERS = [' ', '.', '-', '_', '[', ']', '/', "'"]


from cum.scrapers.base import BaseChapter, BaseSeries, download_pool
from functools import partial
from urllib.parse import urljoin
import concurrent.futures
import re
import requests

name_re = re.compile(r'(?P<type>Chapter|Special) (?P<num>[0-9\.]+)(?:$|\: )'
                     r'(?P<title>.*)')
fallback_re = re.compile(r'(?P<num>.*?)(?:$|\: )(?P<title>.*)')


class DynastyScansSeries(BaseSeries):
    url_re = re.compile(r'https?://dynasty-scans\.com/series/')

    def __init__(self, url, **kwargs):
        super().__init__(url, **kwargs)
        url = url.replace('http://', 'https://')
        if url.endswith('/'):
            url = url[:-1]
        jurl = url + '.json'
        self.json = requests.get(jurl).json()
        self.chapters = self.get_chapters()


# Path: cum/scrapers/base.py
# class BaseSeries(metaclass=ABCMeta):
# class BaseChapter(metaclass=ABCMeta):
#     def __init__(self, url, **kwargs):
#     def alias(self):
#     def follow(self, ignore=False):
#     def get_chapters(self):
#     def name(self):
#     def update(self):
#     def __init__(self, *args, **kwargs):
#     def _strip_unwanted_characters(self, path):
#     def _windows_name_directory(self, directory):
#     def available(self):
#     def create_directory(self, directory):
#     def create_zip(self, files):
#     def db_remove(self):
#     def download(self):
#     def filename(self):
#     def from_url(url):
#     def get(self, use_db=True):
#     def guess_extension(mime_type):
#     def ignore(self):
#     def mark_downloaded(self):
#     def mark_new(self):
#     def page_download_finish(bar, files, fs):
#     def page_download_task(page_num, r):
#     def progress_bar(self, arg):
#     def save(self, series, ignore=False):
#         KEEP_CHARACTERS = [' ', '.', '-', '_', '[', ']', '/', "'"]


# Path: cum/scrapers/dynastyscans.py
from cum.scrapers.base import BaseChapter, BaseSeries, download_pool
from functools import partial
from urllib.parse import urljoin
import concurrent.futures
import re
import requests


name_re = re.compile(r'(?P<type>Chapter|Special) (?P<num>[0-9\.]+)(?:$|\: )'
                     r'(?P<title>.*)')
fallback_re = re.compile(r'(?P<num>.*?)(?:$|\: )(?P<title>.*)')


class DynastyScansSeries(BaseSeries):
    url_re = re.compile(r'https?://dynasty-scans\.com/series/')

    def __init__(self, url, **kwargs):
        super().__init__(url, **kwargs)
        url = url.replace('http://', 'https://')
        if url.endswith('/'):
            url = url[:-1]
        jurl = url + '.json'
        self.json = requests.get(jurl).json()
        self.chapters = self.get_chapters()


    def get_chapters(self):