运行爬虫第一次请求没问题,第二次找不到页面

第一次可以请求到页面内容

img


第二次找不到页面

img


但是过一段时间又可以请求页面,只是不能请求第二次

  • 你可以参考下这个问题的回答, 看看是否对你有帮助, 链接: https://ask.csdn.net/questions/1089396
  • 这篇博客你也可以参考下:电气期刊论文实现:二进制遗传算法求解考虑输电损耗的负荷最优分配【经济调度,有代码】
  • 除此之外, 这篇博客: 通过分子模板构建随机分布在溶液中的纳米颗粒(二)—— 不同形状纳米颗粒中的 读取后,按照手册中分子模板的要求书写出即可 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
  • 这里我提供一种简单的脚本(不考虑键、角、二面角等复杂情况,只提供一种编程思路),请自行学习。

    %---------------------------------------------------------------%
    %                         ATOM SECTION                          %
    %---------------------------------------------------------------%
    Natoms           = length(atom_data_molecule)   ; 
    Bond_number      = 0  ;
    Angle_number     = 0  ;
    Dihedrals_number = 0 ;
    Impropers_number = 0 ;
    
    %---------------------------------------------------------------%
    [fid,message] = fopen("box.data","wt");
    %---------------------------------------------------------------%
    %                         HEADER SECTION                        %
    %---------------------------------------------------------------%
    fprintf(fid,'%s\n',"LAMMPS data file making by MATLAB");
    fprintf(fid,'\n');
    fprintf(fid,'%d ',length(atom_data_molecule)); fprintf(fid,'%s\n ',"atoms");
    % fprintf(fid,'%d ',length(new_bond)); fprintf(fid,'%s\n ',"bonds");
    % fprintf(fid,'%d ',length(new_angle));fprintf(fid,'%s\n ',"angles");
    
    % fprintf(fid,'%d ',length(new_atom)); fprintf(fid,'%s\n ',"atoms");
    % fprintf(fid,'%d ',0); fprintf(fid,'%s\n ',"bonds");
    % fprintf(fid,'%d ',0);fprintf(fid,'%s\n ',"angles");
    
    fprintf(fid,'%s ',"0 ");fprintf(fid,'%s\n ',"dihedrals");
    fprintf(fid,'%s ',"0 ");fprintf(fid,'%s\n ',"impropers");
    %---------------------------------------------------------------%
    fprintf(fid,'\n');
    Natoms_type = 1;
    Bonds_type  = 0;
    Angle_type  = 0;
    fprintf(fid,'%d ',Natoms_type);     fprintf(fid,'%s\n ',"atom types");
    fprintf(fid,'%d ',Bonds_type);      fprintf(fid,'%s\n ',"bond types");
    fprintf(fid,'%d ',Angle_type);      fprintf(fid,'%s\n ',"angle types");
    fprintf(fid,'%s ',"0 ");            fprintf(fid,'%s\n ',"dihedral types");
    fprintf(fid,'%s ',"0 ");            fprintf(fid,'%s\n ',"improper types");
    %---------------------------------------------------------------%
    %                         COOR SECTION                          %
    %---------------------------------------------------------------%
    %fprintf(fid,'\n%s\n ',"PLEASE COPY THE ORGINAL BOX COORDINATION!");
    %---------------------------------------------------------------%
    %                         ATOM SECTION                          %
    %---------------------------------------------------------------%
    new_atom(:,1) = 1:lengthatom_data_molecule(:,5:7);
    new_atom(:,2:4) = atom_data_molecule(:,5:7);
    fprintf(fid,'\n');
    fprintf(fid,'%s\n'," Atoms");
    fprintf(fid,'\n');
    [r,c]=size(new_atom);    
     for i=1:r
        for j=1:c
           fprintf(fid,'%s %s %s %s %s %s %s\n', num2str(new_atom(i,j)));
         end
         fprintf(fid,'\r');
     end
    

链接: https://ask.csdn.net/questions/1089396