![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
qqandpinecone
这是一个个人简介。
展开
-
pymongo简单使用
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/25 15:09# @Author : Oneqq# @File : 1.mongo.py# @Software: PyCharmimport pymongoclient = pymongo.MongoClient()person = client.personstudent = per...原创 2020-04-25 15:39:53 · 281 阅读 · 0 评论 -
pycharm连接mysql
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/24 19:51# @Author : Oneqq# @File : 28.双色球.py# @Software: PyCharmimport requestsfrom fake_useragent import UserAgentfrom lxml import etreeimport p...原创 2020-04-24 23:27:42 · 179 阅读 · 0 评论 -
scrapy 简单使用 pipelines,items
Teminal 输入 scrapy startproject spider1,然后输入 scrapy genspider qidiansettings.py修改4处代码:USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.404...原创 2020-04-23 20:56:11 · 241 阅读 · 0 评论 -
农业新闻内容获取 python
代码:#!-*- coding: utf-8 -*-# @Time : 2020/4/20 22:19# @Author : Oneqq# @File : 27农业新闻内容获取.py# @Software: PyCharmimport requestsfrom fake_useragent import UserAgentfrom lxml import etreeurl...原创 2020-04-20 23:39:11 · 425 阅读 · 0 评论 -
云打码案例 python
1.云打码http://www.yundama.com/ 下载 YDMHTTPDemo3.x(python3)2.将文件解压至项目目录下 命名如yzm_util.py3.注册云打码平台,普通用户和开发者用户各一个,在开发者用户下增加我的新软件,得到软件代码和通讯密匙,在yzm_util.py中修改相应代码4. 将yzm_util.py post_url()方法后修改内容如...原创 2020-04-20 21:52:10 · 581 阅读 · 1 评论 -
多线程使用 python
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/19 21:54# @Author : Oneqq# @File : 24.threads的使用.py# @Software: PyCharmfrom threading import Threadfrom queue import Queuefrom fake_useragent impo...原创 2020-04-19 22:39:05 · 160 阅读 · 0 评论 -
python.jsonpath
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/19 20:57# @Author : Oneqq# @File : 23.jsonpath的使用.py# @Software: PyCharmfrom jsonpath import jsonpathimport jsonfrom fake_useragent import UserAge...原创 2020-04-19 21:18:42 · 179 阅读 · 0 评论 -
python.json
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/19 20:41# @Author : Oneqq# @File : 22.jsonpath的使用.py# @Software: PyCharmimport jsonstr = '{"name":"盗梦笔记"}'print(type(str))obj = json.loads(str)...原创 2020-04-19 20:53:13 · 125 阅读 · 0 评论 -
pyquery
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/19 19:54# @Author : Oneqq# @File : 21.pyquery的使用.py# @Software: PyCharmfrom pyquery import PyQuery as pqimport requestsfrom fake_useragent import ...原创 2020-04-19 20:37:27 · 173 阅读 · 0 评论 -
python.xpath
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/19 19:13# @Author : Oneqq# @File : 20.xpath.py# @Software: PyCharmfrom lxml import etreeimport requestsfrom fake_useragent import UserAgenturl =...原创 2020-04-19 19:42:58 · 106 阅读 · 0 评论 -
糗事百科 正则 python
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/19 16:33# @Author : Oneqq# @File : 18.糗事百科案例.py# @Software: PyCharmimport requestsfrom fake_useragent import UserAgentimport reurl = "https://ww...原创 2020-04-19 17:22:53 · 128 阅读 · 0 评论 -
python-URLError
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/16 13:52# @Author : Oneqq# @File : 14.URLError.py# @Software: PyCharmfrom urllib.request import Request, urlopenfrom fake_useragent import UserAgen...原创 2020-04-16 14:17:11 · 159 阅读 · 0 评论 -
python-cookie
# -*- coding: utf-8 -*-# @Time : 2020/4/15 18:07# @Author : Oneqq# @File : 12.cookie1.py# @Software: PyCharmfrom urllib.request import Request, urlopenfrom fake_useragent import UserAgenturl...原创 2020-04-16 13:46:35 · 102 阅读 · 0 评论 -
python-proxy
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/15 17:44# @Author : Oneqq# @File : 11.proxy.py# @Software: PyCharmfrom urllib.request import Request, urlopenfrom fake_useragent import UserAgentf...原创 2020-04-15 17:58:22 · 1602 阅读 · 0 评论 -
python-https 忽略证书验证
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/15 16:54# @Author : Oneqq# @File : 03-https.py# @Software: PyCharmfrom urllib.request import Request, urlopenfrom fake_useragent import UserAgenti...原创 2020-04-15 17:05:08 · 1378 阅读 · 0 评论 -
python-ajax
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/15 16:11# @Author : Oneqq# @File : 04-ajax.py# @Software: PyCharmfrom urllib.request import Request, urlopenfrom fake_useragent import UserAgentu...原创 2020-04-15 16:40:32 · 137 阅读 · 0 评论 -
python -post请求
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/14 15:47# @Author : Oneqq# @File : 04-post.py# @Software: PyCharmfrom urllib.request import Request, urlopenfrom urllib.parse import urlencodefrom...原创 2020-04-15 15:47:56 · 271 阅读 · 0 评论 -
爬取分页内容 python
代码:# -*- coding: utf-8 -*-# @Time : 2020/4/14 20:40# @Author : Oneqq# @File : 03-gethtml.py# @Software: PyCharmfrom urllib.request import Request, urlopenfrom urllib.parse import urlencodef...原创 2020-04-14 22:07:20 · 252 阅读 · 0 评论 -
今日影评动态爬虫
代码:import requestsimport sqlite3import jsonimport randomdef find(): url = 'http://www.1905.com/api/content/index.php' headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Wi...原创 2020-04-11 23:04:26 · 104 阅读 · 0 评论 -
python 爬取大学排名
代码:import requestsfrom bs4 import BeautifulSoupimport bs4def getHTMLText(url): try: r = requests.get(url,timeout=30) r.raise_for_status() r.encoding = r.apparent_enc...原创 2020-03-31 22:04:08 · 208 阅读 · 0 评论