Last update at :2024-04-29,Edit by888u
This crawler runs under MySQL, Python 2.7, and Mysql-python, so install MySQL and MySQL-python first.
1. Install MySQL installation dependencies
yum install libaioInstall MySQL
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm yum localinstall mysql-community-release-el7-5.noarch.rpm yum install mysql-community-serverStart MySQL
systemctl start mysqldSet MySQL password
mysql_secure_installation;2. Firewall settings and installation of iptables
yum install iptables-servicesOpen port 3306
vi /etc/sysconfig/iptablesAdd
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m udp -p udp –dport 3306 -j ACCEPTRestart iptables
service iptables restart3. Install MySQL-python
yum install MySQL-python4. Setup program
wget https://github.com/x-spiders/baiduyun-spider/archive/master.zip unzip master.zip cd baiduyun-spider-masterSet the account and password for connecting to the database
Open bin/spider.py and modify DB_HOST, DB_PORT, DB_USER, DB_PASSRun the crawler for the first time
python bin/spider.py --seed-userRun the crawler
pythonbin/spider.pySource code source: https://geekspider.org/senior/215.html
Recommended site search: Korean server recommendation, mainland China permanent free cloud server, US server rental, .net space, Chinese international domain name, website domain name ip address query, virtual host rental, mainland China space, private server website space, Hong Kong vps Host rental,
发表评论