摘要: import os import re import requests import json import urllib url = 'http://pic.gamersky.com/home/getimagesindex?sort=time_desc&pageIndex=1&pageSize=5 阅读全文
posted @ 2021-03-15 15:02 outsider078 阅读(99) 评论(0) 推荐(0)
摘要: # 图片爬取 import re import urllib import urllib.request def gethtml(url): page=urllib.request.urlopen(url) html=page.read() return html def getimg(html): 阅读全文
posted @ 2021-03-15 15:00 outsider078 阅读(114) 评论(0) 推荐(0)
摘要: 在web访问中常用的服务器提示代码:404表示未找到页面文件(排错:文件名错误,或路径错误),500表示编译错误 一、jsp的基本结构 1 <!-- JSP中的指令标识,只能jsp文件中,包含对当前jsp文件的属性设置,比如:语言,编码,导入包 --> 2 <%@ page language="ja 阅读全文
posted @ 2021-03-15 14:56 outsider078 阅读(207) 评论(0) 推荐(0)
摘要: 对列表去重: 循环去重(for) 1 li = [1, 2, 3, 3, 4, 2, 3, 4, 5, 6, 1] 2 new_li = [] 3 for i in li: 4 if i not in new_li: 5 new_li.append(i) 6 print(new_li) 键值去重(k 阅读全文
posted @ 2021-03-09 10:59 outsider078 阅读(581) 评论(0) 推荐(0)
摘要: 使用时直接创建img文件夹放进去自己想要的图就ok,然后在HTML主页里面修改一下路径就可以用了 HTML: 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <title>明</title> 6 <link rel=" 阅读全文
posted @ 2021-03-08 08:43 outsider078 阅读(316) 评论(0) 推荐(0)