2022年3月16日

数据库链接

摘要: $host='localhost'; $user='root'; $password='123456';// 库名$dbName='test';// 链接数据库$link=new mysqli($host,$user,$password,$dbName); if ($link->connect_er 阅读全文

posted @ 2022-03-16 15:58 ||子义 阅读(21) 评论(0) 推荐(0) 编辑

2019年6月26日

多进程爬虫

摘要: import requests from multiprocessing import Pool import re from requests.exceptions import RequestException import json def get_one_page(url): try: res = requests.get(url) if res... 阅读全文

posted @ 2019-06-26 15:44 ||子义 阅读(133) 评论(0) 推荐(0) 编辑

Ajax 请求分析抓取百度图片

摘要: import requests from urllib.parse import urlencode from multiprocessing import Pool#开启多进程 from requests.exceptions import RequestException # import re import json from hashlib import md5 def page_g... 阅读全文

posted @ 2019-06-26 15:42 ||子义 阅读(393) 评论(0) 推荐(0) 编辑

selenium + 浏览器 分页爬取 文件

摘要: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC imp... 阅读全文

posted @ 2019-06-26 15:40 ||子义 阅读(687) 评论(0) 推荐(0) 编辑

2019年2月21日

mysql 自定义函数

摘要: create procedure xiao( -> in user varchar(20), -> in age int(10), -> in halr varchar(20) -> )begin -> insert into name_a(username,age,halr) values(use 阅读全文

posted @ 2019-02-21 17:02 ||子义 阅读(208) 评论(0) 推荐(0) 编辑

2019年1月28日

python 字符转换

摘要: int(x [,base ]) 将x转换为一个整数 long(x [,base ]) 将x转换为一个长整数 float(x ) 将x转换到一个浮点数 complex(real [,imag ]) 创建一个复数 str(x ) 将对象 x 转换为字符串 repr(x ) 将对象 x 转换为表达式字符串 阅读全文

posted @ 2019-01-28 15:08 ||子义 阅读(309) 评论(0) 推荐(0) 编辑

2019年1月5日

apache上.htaccess转向nginx上配置.htaccess伪静态规则

摘要: nginx上配置.htaccess伪静态规则 在apache上.htaccess转向,只要apache编译的时候指明支持rewrite模块即可。 但是换到nginx上方法会有不同,有人说把.htaccess转向规则写到nginx的配置文件里面,官方提供的方法之一,肯定可行的。不过,此方法有个问题:不 阅读全文

posted @ 2019-01-05 16:24 ||子义 阅读(1014) 评论(0) 推荐(0) 编辑

apache的.htaccess规则

摘要: 1、.htaccess文件使用前提 .htaccess的主要作用就是实现url改写,也就是当浏览器通过url访问到服务器某个文件夹时,作为主人,我们可以来接待这个url,具体 地怎样接待它,就是此文件的作用。所有的访问都是通过URL实现,所以.htaccess的作用非同小可。正因为此,所以一般地网站 阅读全文

posted @ 2019-01-05 16:00 ||子义 阅读(3349) 评论(1) 推荐(0) 编辑

2018年12月24日

微信关注

摘要: 阅读全文

posted @ 2018-12-24 17:05 ||子义 阅读(113) 评论(0) 推荐(0) 编辑

2018年12月22日

python 查找元素 获取元素信息 元素交互操作 执行JavaScript

摘要: from selenium import webdriver browser = webdriver.Firefox() browser.get("https://tieba.baidu.com/index.html") new_list = browser.find_element_by_id('new_list') user_name = browser.find_element_by_... 阅读全文

posted @ 2018-12-22 15:27 ||子义 阅读(1549) 评论(0) 推荐(0) 编辑

导航