parser = reqparse.RequestParser()
parser.add_argument('manga', required=True)
parser.add_argument('reqtype', required=True)
args = parser.parse_args()
if args['reqtype'] == 'link':
url = args['manga']
response = requests.get(url)
print(response)
soup = BeautifulSoup(response.text, 'lxml')
htmltext = soup.prettify()
jpname = soup.find('p', class_='expandable-text__text')
return {"jpname" : jpname, 'statusApi': 200}, 200 # return data and 200 OK
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1'}
response = requests.get(url, headers=headers)