Guest Posted April 28, 2016 Report Share Posted April 28, 2016 python 2.7 http://pastebin.com/QMjrJdpV sau #url = "http://deseneanime.ro/category/anime" import argparse from bs4 import BeautifulSoup import requests import codecs import sys import time import re url = ('http://deseneanime.ro/category/anime') r = requests.get(url) data = r.text soup = BeautifulSoup(data, 'lxml') mydivs = soup.findAll("div", { "class" : "ui episode list" }) #cauta pentru classa ui episode list x = codecs.open("wow.txt", "w", "utf-8") #deschide wow.txt for link in mydivs: x.write(link.find('a')['href'] + " " + link.find('a').contents[2].string +"\r\n") #scrie toate link-urile din classa ui epsidoe list + data in care au fost postate pukat = time.strftime("%d") #data de astazi def check_string(): w = pukat with open("wow.txt") as f: found = False for line in f: if w in line: print line found = True # ca sa nu printeze ----- la fiecare link care nu e bun time.sleep(1) if not found: print "-------" check_string() time.sleep(5) sys.exit() Salveaza intr-un txt toate link-urile de la anime-urile postate+ data si printeaza pe cele postate astazi + http://pastebin.com/W2DwUJ3F aici zici tu cate anime-uri sa printeze din wow.txt Quote Link to comment Share on other sites More sharing options...