Найти - Пользователи
Полная версия: Парсер facebook на python. перестал работать. кто может помочь?
Начало » Python для новичков » Парсер facebook на python. перестал работать. кто может помочь?
1
steverotaru
Для работы необходимо:
python2.7
selenium (for python2.7)
firefox
like ids
10152189116791607 - like id.

Как работало: https://www.youtube.com/watch?feature=player_embed…

Перестало. Запускается, запускает Mozilla, крутит список лайкнувших но не вытаскивает ничего.
Кто может помочь разобраться?

#!/usr/bin/python2.7
# getyourbots.com
# UPDATE 10 May 2015
# You put here your fb credentials
# Facebook email
emailfb = 'fanebooker19@yahoo.com'
#Facebook password
passwordfb = 'parola191919'
from selenium import webdriver
from time import sleep
import sys
import re
likeID = sys.argv[1]
def banner():
    print("______________________________________________________________________________")
    print("  _____      ___     __              ____        _                            ")
    print(" / ____|    | \ \   / /             |  _ \      | |                           ")
    print("| |  __  ___| |\ \_/ /__  _   _ _ __| |_) | ___ | |_ ___   ___ ___  _ __ ___  ")
    print("| | |_ |/ _ \ __\   / _ \| | | | '__|  _  / _ \| __/ __| / __/ _ \| '_ ` _ \ ")
    print("| |__| |  __/ |_ | | (_) | |_| | |  | |_) | (_) | |_\__ \| (_| (_) | | | | | |")
    print(" \_____|\___|\__||_|\___/ \__,_|_|  |____/ \___/ \__|___(_)___\___/|_| |_| |_|")
    print("______________________________________________________________________________")
    print("\n")
banner()
print "[+] ID: " + str(likeID)
print ""
print "[+] Starting firefox"
driver = webdriver.Firefox()
driver.get('https://m.facebook.com/login.php')
print "[+] Logging in"
driver.find_element_by_name('email').send_keys(emailfb)
password = driver.find_element_by_name('pass')
password.send_keys(passwordfb)
password.submit()
sleep(1)
count = 0
o = open(str(likeID) + '.txt','wb')
driver.get('https://m.facebook.com/browse/likes/?id=' + str(likeID))
while True:
  
  
  links = driver.find_elements_by_tag_name('a')
  for link in links:
    try:
      if '?fref=' not in link.get_attribute("href"):
        continue
      match = re.search('facebook.com/(.*)?fref', link.get_attribute("href"))
      
      line = str(match.groups(0)[0]).replace('?','') + '@facebook.com'
      print '[+] ' + line
      o.write(line + '\n')
      count = count + 1
      
    except Exception, e:
      #print 'Error: ' + str(e)
      pass
      
  
  if 'No results found.' in driver.page_source:
    break
  
  try:
    sleep(2)
    driver.find_element_by_partial_link_text("See More").click()
  except:
    try:
      driver.find_element_by_partial_link_text("See more").click()
    except:
      break
  
  
  sleep(1.5)
  
    
o.close()
driver.close()
print "[+] Emails: " + str(count)
werter
1. Ссылка с видео не работает
2. Пароль от аккаунта убрали бы
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB