########################################################## # Scrapy template modified by: # * Nicolas Felipe Trujillo Montero ########################################################## # Needed Libraries import scrapy class MyanimelistScrappingSpider(scrapy.Spider): # Class Attributes name = "myanimelist_scrapping" allowed_domains = ["myanimelist.net"] start_urls = ["https://myanimelist.net/anime/" + str(x) + "" for x in range(0,10000)] def parse(self, response): path_title = "div > div.h1.edit-info > div.h1-title > div > h1.title-name.h1_bold_none > strong::text" path_synopsis = "div#content > table > tr > td > div.rightside.js-scrollfix-bottom-rel > table > tr > td > p" for anime_info in response.css("div#myanimelist > div.wrapper > div#contentWrapper"): try: title = anime_info.css(path_title).get() # print(title) except: title = None try: synopsis = anime_info.css(path_synopsis).get() \ .replace("""
""", '') \ .replace("\n", "") \ .replace("","") \ .replace("
","") \ .replace("[Written by MAL Rewrite]","") \ .replace("