摘要: import sys, re from handlers import HTMLRenderer from util import blocks from rules import rule_list #将文本转成网页 class Parser: def __init__(self, handler 阅读全文
posted @ 2020-05-18 16:52 王者2 阅读(761) 评论(0) 推荐(0) 编辑
摘要: import sys import os import glob from os import path from aip import AipOcr from PIL import Image from tkinter import * import tkinter.filedialog root 阅读全文
posted @ 2020-05-18 16:47 王者2 阅读(222) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import os import sys import jieba import codecs import math import jieba.posseg as pseg names = {} relationships = {} lineName 阅读全文
posted @ 2020-05-18 16:45 王者2 阅读(204) 评论(0) 推荐(0) 编辑
摘要: from collections import Counter import re filename='中国姓名.txt' words=re.findall('\w+',open(filename).read().lower()) str=Counter(words).most_common(100 阅读全文
posted @ 2020-05-18 16:40 王者2 阅读(148) 评论(0) 推荐(0) 编辑
摘要: import os import codecs import chardet word_lst = [] word_dict = {} infile=input("请输入统计文件名:") outfile=input("请输入输出结果文件名:") exclude_str = input("请输入过滤字 阅读全文
posted @ 2020-05-18 16:37 王者2 阅读(247) 评论(0) 推荐(0) 编辑
摘要: import os libs = {"numpy", "whell", "flask"} try: for lib in libs: os.system("pip install " + lib) print("Successful") except: print("Failed") 阅读全文
posted @ 2020-05-18 16:33 王者2 阅读(151) 评论(0) 推荐(0) 编辑
摘要: import urllib3 import urllib import http.cookiejar import webbrowser #声明一个CookieJar对象实例来保存cookie #利用urllib2库的HTTPCookieProcessor对象来创建cookie处理器 #此处的ope 阅读全文
posted @ 2020-05-18 16:32 王者2 阅读(950) 评论(0) 推荐(0) 编辑
摘要: import json import requests import re import time from requests.exceptions import RequestException def get_one_page(url): try: headers = { 'User-Agent 阅读全文
posted @ 2020-05-18 16:30 王者2 阅读(168) 评论(0) 推荐(0) 编辑
摘要: #抓取淘宝数据 import re import requests from bs4 import BeautifulSoup import string import os import sqlite3 class Getdata: def getHTMLText(url,header): try 阅读全文
posted @ 2020-05-18 16:27 王者2 阅读(290) 评论(0) 推荐(0) 编辑
摘要: #模仿浏览器 #下载地址 #创建数据库 #初始化downloadSpider文件夹 #访问京东页面 #数据库增删改查 from selenium.webdriver.common.keys import Keys from selenium import webdriver import threa 阅读全文
posted @ 2020-05-18 16:18 王者2 阅读(263) 评论(0) 推荐(0) 编辑