07 2020 档案
摘要:详情查看下面的代码: 如果被识别就要添加一个cookie如果没有被识别的话就要一个user—agent就好了。如果出现乱码就设置编码格式为utf-8 #静态的数据一般在elements中(复制文字到sources按ctrl+f搜索。找到的为静态),而动态去network中去寻找相关的信息 impor
阅读全文
摘要:这次主要是爬了京东上一双鞋的相关评论:将数据保存到excel中并可视化展示相应的信息 主要的python代码如下: 文件1 #将excel中的数据进行读取分析 import openpyxl import matplotlib.pyplot as pit #数据统计用的 wk=openpyxl.lo
阅读全文
摘要:具体代码如下: import requests import re headers = {'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.
阅读全文
摘要:简单的一下:只爬取一个页面上的(可以爬取多个页面)用到了拼接format以及list的遍历的等等小的知识点 import requests import re #下面这个就是伪装成浏览器正常访问浏览器 headers = {'user-agent':'Mozilla/5.0 (Windows NT
阅读全文
摘要:分组背包: #include<iostream> #include<cmath> #include<cstring> #include<algorithm> using namespace std; int n,m; const int N=105; int f[N],v[N],w[N]; int
阅读全文
摘要:首先是01背包的算法代码: #include<iostream> #include<cmath> #include<cstring> #include<algorithm> using namespace std; const int N=1005; int f[N]; int v[N],w[N];
阅读全文

浙公网安备 33010602011771号