python 动态网页信息的爬取问题
学习的B站上关于动态网页爬取的内容,更换了需要提取的网址。显示的数据不对,不清楚是什么意思。与原教学内容不同的是,更改后的网址需要输入用户名密码。import requests
import sqlite3
import json
from lxml import etree
def find():
url = 'http://58.213.112.252:8115/yptrade/index.html'
header = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'}
parmas = {
'_search': 'false',
'nd': '1569311443809',
'rows': '10',
'page': '1',
'sord': 'asc',
}
response = requests.get(url, headers=header, params=parmas)
result = response.text
print(result)
find()
运行结果
C:\python3.6\python.exe C:/Users/Administrator/Desktop/python/猫眼爬虫/省平台.py
<script type='text/javascript'>top.location = 'http://58.213.112.252:8115/sso/login.html';</script>
Process finished with exit code 0