Small crawlers need to log on to the wheat College website and log on to the wheat College.
Try python to simulate login site: http://www.maiziedu.com/
#! /Usr/bin/env/python # coding: utf-8if _ name _ = '_ main _': from urllib import request, parseurl = 'HTTP: // www.maiziedu.com/user/login/'headers= {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36 ", 'origin': 'http: // www.maiziedu.com ', 'Referer': 'http: // your account', 'password _ L': 'Your password'} postdata = parse. urlencode (values ). encode (encoding = 'utf-8') req = request. request (url, headers = headers, data = postdata) resp = request. urlopen (req) print (resp. read (). decode ('utf-8 '))
Running result:
Login successful!
The logon result from the web page is consistent with the simulated logon result.