Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import re
- import random
- import sys
- import json
- import time
- import datetime
- import base64
- import urllib
- if sys.version_info[0] < 3:
- class urllib:
- parse = __import__("urllib")
- request = __import__("urllib2")
- input = raw_input
- import codecs
- import Queue as queue
- class http:
- client = __import__("httplib")
- else:
- import http.client
- import queue
- import urllib.request
- import urllib.parse
- def getAnimeInfo(args):
- raw_data = urllib.request.urlopen("http://31.220.49.92:61785/api/myanimelist.py?cmd=anime&args=%s"%(args)).read().decode("utf-8")
- data = json.loads(raw_data)
- newset = list()
- for anime in data:
- image = anime["image"]
- idanime = anime["id"]
- title = anime["title"]
- english = anime["english"]
- japanese = anime["japanese"]
- genres = anime["genres"]
- producers = anime["producers"]
- episodes = anime["episodes"]
- score = anime["score"]
- duration = anime["duration"]
- rating = anime["rating"]
- typeanime = anime["type"]
- status = anime["status"]
- start_date = anime["start_date"]
- end_date = anime["end_date"]
- synopsis = anime["synopsis"]
- newset.append("Image: %s <br />ID: %s <br />Title: %s <br />English name: %s <br />Japanese name: %s <br />Genres: %s <br />Producers: %s <br />Episodes: %s <br />Score: %s <br />Duration: %s <br />Rating: %s <br />Type: %s <br />Status: %s <br />Start date: %s <br />End date: %s <br />Synopsis: %s " % (image, idanime, title, english, japanese, genres, producers, episodes, score, duration, rating, typeanime, status, start_date, end_date, synopsis))
- return newset[0]
- def getMangaInfo(args):
- raw_data = urllib.request.urlopen("http://31.220.49.92:61785/api/myanimelist.py?cmd=manga&args=%s"%(args)).read().decode("utf-8")
- data = json.loads(raw_data)
- newset = list()
- for manga in data:
- image = manga["image"]
- idmanga = manga["id"]
- title = manga["title"]
- english = manga["english"]
- japanese = manga["japanese"]
- genres = manga["genres"]
- author = manga["author"]
- serialization = manga["serialization"]
- chapters = manga["chapters"]
- volumes = manga["volumes"]
- score = manga["score"]
- typemanga = manga["type"]
- status = manga["status"]
- start_date = manga["start_date"]
- end_date = manga["end_date"]
- synopsis = manga["synopsis"]
- newset.append("Image: %s <br />ID: %s <br />Title: %s <br />English name: %s <br />Japanese name: %s <br />Genres: %s <br />Author: %s <br />Serialization: %s <br />Chapters: %s <br />Volumes: %s <br />Score: %s <br />Type: %s <br />Status: %s <br />Start date: %s <br />End date: %s <br />Synopsis: %s " % (image, idmanga, title, english, japanese, genres, author, serialization, chapters, volumes, score, typemanga, status, start_date, end_date, synopsis))
- return newset[0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement