随笔分类 -  python

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页
python学习
摘要:下载 markupbase 阅读全文
posted @ 2021-10-24 16:30 myrj 阅读(24) 评论(0) 推荐(0)
摘要:url="https://www.liepin.com/campus/" import requests from bs4 import BeautifulSoup rr=requests.get(url) soup =BeautifulSoup(rr.text, "lxml") for itema 阅读全文
posted @ 2021-10-21 06:49 myrj 阅读(485) 评论(0) 推荐(0)
摘要:url="https://www.liepin.com/job/1932123793.shtml" import requests from bs4 import BeautifulSoup rr=requests.get(url) soup =BeautifulSoup(rr.text, "lxm 阅读全文
posted @ 2021-10-20 20:42 myrj 阅读(199) 评论(0) 推荐(0)
摘要:今天写爬虫,遇到一个坑,提示[scrapy.core.scraper] ERROR: Spider must return request, item, or None, got 'Tag' in <GET https://www. 其实原因很意外,我在代码中使用了item,同时scrapy又用it 阅读全文
posted @ 2021-10-20 19:35 myrj 阅读(2984) 评论(0) 推荐(0)
摘要:def __init__(self, *args, **kwargs): super(MmzzSpider, self).__init__(*args, **kwargs) # 这里是关键 self.count=0 def parse_item(self, response): soup =Beau 阅读全文
posted @ 2021-10-19 22:06 myrj 阅读(35) 评论(0) 推荐(0)
摘要:from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selen 阅读全文
posted @ 2021-10-16 20:09 myrj 阅读(88) 评论(0) 推荐(0)
摘要:python3爬虫:爬虫进阶之ajax数据爬取发布时间: 2019-02-06 19:21:14动态网页数据抓取什么是AJAX:AJAX(Asynchronouse JavaScript And XML)异步JavaScript和XML。通过在后台与服务器进行少量数据交换,Ajax 可以使网页实现异 阅读全文
posted @ 2021-10-16 10:41 myrj 阅读(120) 评论(0) 推荐(0)
摘要:1.python -m pip install --upgrade pip(升级PIP) 2.pip install wheel 3.pip install lxml 4.pip install twisted 5.pip install pywin32 6.pip install srapy 阅读全文
posted @ 2021-10-13 06:23 myrj 阅读(59) 评论(0) 推荐(0)
摘要:self.SD.SetCapability(twain.CAP_DUPLEXENABLED, twain.TWTY_BOOL, 0) #单面扫描 self.SD.SetCapability(twain.CAP_DUPLEXENABLED, twain.TWTY_BOOL, 1)#双面扫描 self. 阅读全文
posted @ 2021-05-17 10:36 myrj 阅读(414) 评论(0) 推荐(0)
摘要:import sys from PIL import Image try: import src.abstract as pyinsane except ImportError: import pyinsane.abstract as pyinsane def set_scanner_opt(sca 阅读全文
posted @ 2021-05-15 06:48 myrj 阅读(408) 评论(0) 推荐(0)
摘要:def multiScan(self): """ Scan and return an array of PIL objects If no images, will return an empty array """ self.scanner.RequestAcquire(0, 1) images 阅读全文
posted @ 2021-05-14 06:30 myrj 阅读(1473) 评论(1) 推荐(0)
摘要:import pyaudio import wave from PIL import ImageGrab import cv2 import threading import time from numpy import array from moviepy.editor import * impo 阅读全文
posted @ 2021-05-02 17:24 myrj 阅读(664) 评论(0) 推荐(0)
摘要:p = lambda x,y:x+y#匿名函数匿名函数lambda:是指一类无需定义标识符(函数名)的函数或子程序。 #lambda 函数可以接收任意多个参数 (包括可选参数) 并且返回单个表达式的值。 print(p(4,6))10 a=lambda x:x*x print(a(3))9 a = 阅读全文
posted @ 2021-01-31 20:29 myrj 阅读(144) 评论(0) 推荐(0)
摘要:import pypinyin # 不带声调的(style=pypinyin.NORMAL) def pinyin(word): s = '' for i in pypinyin.pinyin(word, style=pypinyin.NORMAL): s += ''.join(i) return 阅读全文
posted @ 2021-01-31 14:21 myrj 阅读(1081) 评论(0) 推荐(1)
摘要:1.确认安装位置:D:\Anaconda3 2.进入: D:\Anaconda3\Scripts 3.pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pypinyin 阅读全文
posted @ 2021-01-31 14:17 myrj 阅读(478) 评论(0) 推荐(0)
摘要:#!/usr/bin/env python3 # -*- coding: utf-8 -*- '''对于单个字符的编码,Python提供了ord()函数获取字符的整数表示,chr()函数把编码转换为对应的字符: 并不局限于ascii编码 由于Python的字符串类型是str,在内存中以Unicode 阅读全文
posted @ 2021-01-30 22:01 myrj 阅读(192) 评论(0) 推荐(0)
摘要:#实时监控剪贴板内容的变化,并替换其中的回车,换行,逗号,再写入剪切板,以供使用。 import pyperclip import time last_string = pyperclip.paste() while True: # 检测频率 time.sleep(0.2) string = pyp 阅读全文
posted @ 2021-01-30 21:42 myrj 阅读(818) 评论(0) 推荐(0)
摘要:'''pandas 中 inplace 参数在很多函数中都会有,它的作用是:是否在原对象基础上进行修改 ​ inplace = True:不创建新的对象,直接对原始对象进行修改; ​ inplace = False:对数据进行修改,创建并返回新的对象承载其修改结果。 默认是False,即创建新的对象 阅读全文
posted @ 2021-01-30 08:46 myrj 阅读(177) 评论(0) 推荐(0)
摘要:import aircv as ac import matplotlib.pyplot as plt '''imshow()函数格式为: matplotlib.pyplot.imshow(X, cmap=None) X: 要绘制的图像或数组。 cmap: 颜色图谱(colormap), 默认绘制为R 阅读全文
posted @ 2021-01-29 07:29 myrj 阅读(256) 评论(0) 推荐(0)
摘要:arrarray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])arr1array([0, 1, 2, 3, 4])np.intersect1d(arr,arr1)#计算数组ARR ARR1的交集,并排序array([0, 1, 2, 3, 4])np.union1d(arr,arr 阅读全文
posted @ 2021-01-28 07:30 myrj 阅读(183) 评论(0) 推荐(0)

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页