
Python
qqandpinecone
这是一个个人简介。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
pymongo简单使用
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/25 15:09 # @Author : Oneqq # @File : 1.mongo.py # @Software: PyCharm import pymongo client = pymongo.MongoClient() person = client.person student = per...原创 2020-04-25 15:39:53 · 333 阅读 · 0 评论 -
pycharm连接mysql
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/24 19:51 # @Author : Oneqq # @File : 28.双色球.py # @Software: PyCharm import requests from fake_useragent import UserAgent from lxml import etree import p...原创 2020-04-24 23:27:42 · 236 阅读 · 0 评论 -
scrapy 简单使用 pipelines,items
Teminal 输入 scrapy startproject spider1,然后输入 scrapy genspider qidian settings.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 · 304 阅读 · 0 评论 -
农业新闻内容获取 python
代码: #!-*- coding: utf-8 -*- # @Time : 2020/4/20 22:19 # @Author : Oneqq # @File : 27农业新闻内容获取.py # @Software: PyCharm import requests from fake_useragent import UserAgent from lxml import etree url...原创 2020-04-20 23:39:11 · 538 阅读 · 0 评论 -
云打码案例 python
1.云打码http://www.yundama.com/ 下载 YDMHTTPDemo3.x(python3) 2.将文件解压至项目目录下 命名如yzm_util.py 3.注册云打码平台,普通用户和开发者用户各一个,在开发者用户下增加我的新软件,得到软件代码和通讯密匙,在yzm_util.py中修改相应代码 4. 将yzm_util.py post_url()方法后修改内容如...原创 2020-04-20 21:52:10 · 725 阅读 · 1 评论 -
多线程使用 python
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/19 21:54 # @Author : Oneqq # @File : 24.threads的使用.py # @Software: PyCharm from threading import Thread from queue import Queue from fake_useragent impo...原创 2020-04-19 22:39:05 · 221 阅读 · 0 评论 -
python.jsonpath
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/19 20:57 # @Author : Oneqq # @File : 23.jsonpath的使用.py # @Software: PyCharm from jsonpath import jsonpath import json from fake_useragent import UserAge...原创 2020-04-19 21:18:42 · 238 阅读 · 0 评论 -
python.json
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/19 20:41 # @Author : Oneqq # @File : 22.jsonpath的使用.py # @Software: PyCharm import json str = '{"name":"盗梦笔记"}' print(type(str)) obj = json.loads(str) ...原创 2020-04-19 20:53:13 · 175 阅读 · 0 评论 -
pyquery
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/19 19:54 # @Author : Oneqq # @File : 21.pyquery的使用.py # @Software: PyCharm from pyquery import PyQuery as pq import requests from fake_useragent import ...原创 2020-04-19 20:37:27 · 231 阅读 · 0 评论 -
python.xpath
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/19 19:13 # @Author : Oneqq # @File : 20.xpath.py # @Software: PyCharm from lxml import etree import requests from fake_useragent import UserAgent url =...原创 2020-04-19 19:42:58 · 147 阅读 · 0 评论 -
糗事百科 正则 python
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/19 16:33 # @Author : Oneqq # @File : 18.糗事百科案例.py # @Software: PyCharm import requests from fake_useragent import UserAgent import re url = "https://ww...原创 2020-04-19 17:22:53 · 191 阅读 · 0 评论 -
python-URLError
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/16 13:52 # @Author : Oneqq # @File : 14.URLError.py # @Software: PyCharm from urllib.request import Request, urlopen from fake_useragent import UserAgen...原创 2020-04-16 14:17:11 · 222 阅读 · 0 评论 -
python-cookie
# -*- coding: utf-8 -*- # @Time : 2020/4/15 18:07 # @Author : Oneqq # @File : 12.cookie1.py # @Software: PyCharm from urllib.request import Request, urlopen from fake_useragent import UserAgent url...原创 2020-04-16 13:46:35 · 151 阅读 · 0 评论 -
python-proxy
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/15 17:44 # @Author : Oneqq # @File : 11.proxy.py # @Software: PyCharm from urllib.request import Request, urlopen from fake_useragent import UserAgent f...原创 2020-04-15 17:58:22 · 2242 阅读 · 0 评论 -
python-https 忽略证书验证
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/15 16:54 # @Author : Oneqq # @File : 03-https.py # @Software: PyCharm from urllib.request import Request, urlopen from fake_useragent import UserAgent i...原创 2020-04-15 17:05:08 · 1586 阅读 · 0 评论 -
python-ajax
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/15 16:11 # @Author : Oneqq # @File : 04-ajax.py # @Software: PyCharm from urllib.request import Request, urlopen from fake_useragent import UserAgent u...原创 2020-04-15 16:40:32 · 190 阅读 · 0 评论 -
python -post请求
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/14 15:47 # @Author : Oneqq # @File : 04-post.py # @Software: PyCharm from urllib.request import Request, urlopen from urllib.parse import urlencode from...原创 2020-04-15 15:47:56 · 375 阅读 · 0 评论 -
爬取分页内容 python
代码: # -*- coding: utf-8 -*- # @Time : 2020/4/14 20:40 # @Author : Oneqq # @File : 03-gethtml.py # @Software: PyCharm from urllib.request import Request, urlopen from urllib.parse import urlencode f...原创 2020-04-14 22:07:20 · 309 阅读 · 0 评论 -
今日影评动态爬虫
代码: import requests import sqlite3 import json import random def 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 · 170 阅读 · 0 评论 -
python 爬取大学排名
代码: import requests from bs4 import BeautifulSoup import bs4 def getHTMLText(url): try: r = requests.get(url,timeout=30) r.raise_for_status() r.encoding = r.apparent_enc...原创 2020-03-31 22:04:08 · 272 阅读 · 0 评论