U
Utente cancellato 275459
Salve gente sto creando un web scraper con bs4 solo che non funziona e non so qual'è l'errore.
Codice:
Codice:
Python:
from bs4 import BeautifulSoup
import bs4
import requests, lxml
import os
import selenium
from selenium import webdriver
from selenium.webdriver import firefox
global link
link="https://www.shodan.io/search?query=ftp"
def ftp():
os.system("wget "+link)
os.system("mv search?query=ftp .index.html")
files=open(".index.html","r")
html=files.read()
soup=BeautifulSoup(html, 'html.parser')
result=soup.find_all("div", class_="ip")
for a in result:
print(a.get_attribute("href"))
files=close()
os.system("rm .index.html")
if __name__ == "__main__":
ftp()