![]() |
Консольный грабер ответов mail.ru написанный на python'е. Писал для себя, когда надо было получить несколько сотен мыл.
Для работы требуется python третий версии [QUOTE="None"] import re from urllib.request import * import threading class thread(threading.Thread): def __init__(self, d1, d2): threading.Thread.__init__(self) self.d1 = d1 self.d2 = d2 def run(self): for x in range(self.d1, self.d2): url = open_page(x) for i in url: grab_mail(i) def grab_mail(url): res = urlopen("http://otvet.mail.ru/question/" + url).read().decode("cp1251") mails = re.findall('(.*)ge&to=(.+?)"', res) for mail in mails: print(mail[1]) def open_page(num): res = urlopen("http://otvet.mail.ru/open/?pg=" + str(num)).read().decode("cp1251") url = re.findall(' |
| Время: 18:16 |