python+selenium+chromedriver grab shodan search results

Function: Grab the search results of shodan without points, and save the IP as txt

premise:

  ①shodan members (ps: Black Friday discount)

  ② python27 is installed

  ③The latest version of Google Chrome (ps: it is not necessary to be the latest, but it must be able to match the chromedriver)

  ④Windows system

Start:

1. Install the necessary packages

  ①win+R call cmd

  ②cd C:\Python27\Scripts (ps: use your own actual installation directory)

  ③pip install selenium

  ④pip install pyquery

2. Download core components and scripts

  ① shodan_project.zip and unzip it to C:\Python27\

  ② chromedriver unzip into C:\Python27\shodan_project (the version should correspond to Google Chrome, preferably both are the latest)

Use tutorial:

  ①Modify the shodan account password, and the keyword you want to search

  ②python shodan_main.py The following screen appears to indicate successful operation

 

  ③The result is saved in success.txt

 

shortcoming:

  ①Not every keyword and page can be successfully crawled

Improve:

  ①Use bat to start shodan_main.py with one click

@echo off  
cd  C:\Python27\shodan_project

start python shodan_main.py

pause 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325016098&siteId=291194637