yo20063 Posted December 1, 2015 Report Posted December 1, 2015 (edited) Avand in vedere ca a fost scoasa functia de a vedea cine iti urmareste thread-ul, am facut un mic script pentru a vedea totusi Trebuie sa instalati libraria lxml si requests ca sa functionezefrom lxml import htmlimport requestsimport warningsimport timewarnings.filterwarnings("ignore")data = { "do":"login", "vb_login_username":" ", # username-ul tau "vb_login_password":" ", # parola ta "cookieuser": "1" }headers = { "User-agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1", "Referer":"https://rstforums.com/forum/online.php" }auth = "https://rstforums.com/forum/login.php"req = requests.post(auth, headers=headers, data=data)cookies = dict(req.cookies)tree = html.fromstring(req.text)sesiune = tree.xpath('///div[@id="redirect_button"]/a/@href')sesiune = [elem.replace("https://rstforums.com/forum/online.php", "") for elem in sesiune]sesiune = sesiune[0]url = "https://rstforums.com/forum/online.php?order=asc&sort=username&pp=100&page=1" + sesiuneonline = requests.get(url, cookies=cookies)body = html.fromstring(online.text)users = body.xpath('//tr/td[@class="whoinfo"]/a/text()')numar =[]for i in (xrange(2,len(users)+2)): numar.append(i)users_threads = []for i in numar: i = str(i) users = body.xpath('//tr['+i+']/td[@class="whoinfo"]/a/text()|//tr['+i+']/td[3]/div/a/text()') users_threads.append(users)for sublist in users_threads: if len(sublist) != 2: sublist.insert(2,"Nu urmareste un thread anume!")thread = raw_input("Introdu' numele thread-ului: ")for i in xrange(0, len(users_threads)): if thread in users_threads[i][1]: print users_threads[i][0] + " urmareste thread-ul introdus de tine!"Deocamdata e facut doar pentru membri, fara guests, dar se poate completa rapid. Edited December 1, 2015 by yo20063 2 Quote
QuoVadis Posted December 2, 2015 Report Posted December 2, 2015 @yo20063 - Ii recunoaste si pe cei care au invisible mode on? Quote
MasterSenpai Posted December 2, 2015 Report Posted December 2, 2015 @yo20063 - Ii recunoaste si pe cei care au invisible mode on?Doar ce iti este si tie vizibil ca utilizator cand vizualizezi pagina online.php, vad ca foloseste libraria lxml. Quote
Wav3 Posted December 3, 2015 Report Posted December 3, 2015 Si cum functioneaza? Si ce limbaj e? Cum se ruleaza?Da detalii cand imparti ceva ca nu toti stim Python si compilere catre .exe. Quote
Massaro Posted December 4, 2015 Report Posted December 4, 2015 Cand doua topicuri au acelasi nume, ia userii de la ambele topicuri? (ex: 1 si 2) Quote
Che Posted December 4, 2015 Report Posted December 4, 2015 Si cum functioneaza? Si ce limbaj e? Cum se ruleaza?Da detalii cand imparti ceva ca nu toti stim Python si compilere catre .exe.Salvezi codul intr-un fisier numit script.py, instalezi Python si apoi din consola Python rulezi ./script.py sau script.py sau scrii python script.py.Nu-i asa ? Quote