05 2019 档案
摘要:Requests 安装requests模块: D:\Install\Python36>pip3 install requests 请求方式 #coding:utf-8 import requests requests.get("http://www.baidu.com") requests.post("http://www.baidu.com") #requests.put("http请求") ...
阅读全文
摘要:1、从酷狗网站爬取 新歌首发的新歌名字、播放时长、链接等 2、sohu网站首页 爬取包含"体育"2个字的链接 3、使用代理服务器 发送请求 4、Srapy 爬虫框架 5、Scrapy框架的例子,酷狗爬取新歌首发的歌曲名称、播放时长、歌曲链接等
阅读全文
摘要:html = """ The Dormouse's story The Dormouse's story Once upon a time there were three little sisters; and their names were Lacie and Tillie and they lived at the bottom of a well. ... """ soup=BS(...
阅读全文
摘要:#encoding=utf-8 ''' excel基本操作整理 ''' #openpyxl 版本2.5.4 from openpyxl import * import datetime as dt from datetime import datetime as dtt #新建create_sheet、copy_worksheet wb=Workbook() wb.create_sheet(...
阅读全文
摘要:#encoding=utf-8 #参考csdn某篇文章 import socket def get_host_ip(): """ 查询本机ip地址 :return: ip """ try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('8....
阅读全文
摘要:1、mysql常用增删查改 2、python 操作mysql的常用小例子 sql="select t.env_sub_type,t.env_key,t.env_key_value from b_env_info t where t.env_no=:1 and t.env_sub_type=:2" c
阅读全文