Professional Documents
Culture Documents
Crawl Manga in Python
Crawl Manga in Python
import requests
import os.path
from os import path
import re
#h�m filter
def not_relative_url(href):
return re.compile('^/c').search(href) is not None
chapterlist.update({title_chapter.upper():"https://blogtruyen.com"+link_chapter})
else:
print ("Cannot find manga list")
return chapterlist
count=0
value=int(input())
if value==0:
exit
elif value==1:
print("\nNHAP CHAP BAN MUON DOWNLOAD")
value_one=input()
name_chapter="ONE PIECE CHAP "+value_one
if name_chapter in DS_chapter:
download_chapter(name_chapter,DS_chapter)
else:
print("CHAP CHUA RA HOAC BI LOI ROI BAN OI!!!")
elif value==2:
for name_chapter in DS_chapter:
download_chapter(name_chapter,DS_chapter)
else:
print("BAN NHAP CHUA HOP LE!!!")