#!/usr/bin/env python3 from http.server import BaseHTTPRequestHandler, HTTPServer import datetime from time import perf_counter import os import json import urllib.parse import configuration import socket import requests from userio import * # Random Example URL: https://manganelo.tv/chapter/dy925032/chapter_21 # Random Example URL: https://manganelo.tv/chapter/read_rurouni_kenshin/chapter_257 server = None csvFilename = None connectionResults = None def getManganeloTV(url): debug("Downloading: "+url) r = requests.get(url, allow_redirects=True) content = r.text #print(r.text) lineNextChapter = None linePreviousChapter = None lineTitle = None linkNext = None linkPrev = None listImages = [] for line in content.split("\n"): if "navi-change-chapter-btn-prev a-h" in line and linePreviousChapter is None: linePreviousChapter = line elif "navi-change-chapter-btn-next a-h" in line and lineNextChapter is None: lineNextChapter = line elif "<"): # ~ if "https://" in subLine.split("\"")[1]: if "https://" in subLine: listImages.append(subLine.split("\"")[1]) if lineNextChapter is not None: linkNext="https://manganelo.tv"+lineNextChapter.split("\"")[5] if linePreviousChapter is not None: linkPrev="https://manganelo.tv"+linePreviousChapter.split("\"")[5] mangaTitle=lineTitle.split("\"")[3].split(" - Manganelo")[0] say("Manga :"+mangaTitle) pageContent = "" pageContent += "
Request: "+self.path+"
\n" data_page += "