def get_upload_date_on_nyaa(): dates = [] parsed_query = request.form['search'].replace('-nyaa', '') date = NyaaScraper(parsed_query) for item in date.get_absolute_url(): dates.append(date.get_upload_date(item)) return dates
def run_search_on_nyaa(): parsed_query = request.form['search'].replace('-nyaa', '') search_on_nyaa = NyaaScraper(parsed_query) fields = namedtuple('Fields', 'name link') data = fields(name=search_on_nyaa.scrap_episode_name(), # size=search_on_nyaa.scrap_episode_size(), link=search_on_nyaa.scrap_episode_link()) # seeds=search_on_nyaa.scrap_episode_seeds(), # leeches=search_on_nyaa.scrap_episode_leeches()) return zip(data.name, # data.size, data.link)