Function generates URLs in split command fashion. If first_url is xaaaaa and last_url is xaaaac, it will automatically generate xaaaab.

def generate_urls(self, first_url, last_url):
        """
        Function generates URLs in split command fashion. If first_url is xaaaaa and last_url is xaaaac, it will automatically generate xaaaab.
        """
        first_url = first_url.split("/")
        last_url = last_url.split("/")
        if first_url[0].lower() != "http:" or last_url[0].lower() != "http:":
            raise Exception("URLs should be accessible via HTTP.")

        url_base = "/".join(first_url[:-1])
        start_index = first_url[-1].index("a")
        file_name = first_url[-1][0:start_index]
        url_base += "/" + file_name

        start = first_url[-1][start_index:]
        finish = last_url[-1][start_index:]

        if start.count(".") == 1 and finish.count(".") == 1:
            start, file_extension = start.split(".")
            finish, _ = finish.split(".")
            if len(start) != len(finish):
                raise Exception("Filenames in url should have the same length.")
            file_extension = "." + file_extension
        else:
            raise Exception("URLs does not have the same pattern.")

        alphabet = "abcdefghijklmnopqrstuvwxyz"
        product = itertools.product(alphabet, repeat=len(start))

        urls = []
        for p in product:
            urls.append([url_base + "".join(p) + file_extension])
            if "".join(p) == finish:
                break
        return urls