摘要: # python3.6 from ctypes import * import os import datetime import ftplib import time class myFtp: ftp = ftplib.FTP() def __init__(self, host, port=21) 阅读全文
posted @ 2020-10-12 09:16 不可描述的细节 阅读(137) 评论(0) 推荐(0)
摘要: 百度翻译js破解 加密参数为sign js加密 token非加密字段,可固定cookie 为必须字段,建议手动复制或者使用selenium 自动获取 import execjs import requests class BaiDuTranslate: def __init__(self, quer 阅读全文
posted @ 2020-10-10 16:52 不可描述的细节 阅读(471) 评论(0) 推荐(0)
摘要: """布隆过滤器 主要作url 的去重""" from pybloom_live import BloomFilter # 实例化布隆过滤器的容器 capacity 最大保存数值, error_rate 接近最大值是的容错率 bf = BloomFilter(capacity=1000, error 阅读全文
posted @ 2020-10-10 16:44 不可描述的细节 阅读(87) 评论(0) 推荐(0)
摘要: 安装 xmltodict pip install xmltodict 转化代码 import jsonimport xmltodictdef xml_to_json(): with open('LocList.xml', 'r', encoding='utf8') as f: xmlStr = f. 阅读全文
posted @ 2020-09-25 17:00 不可描述的细节 阅读(243) 评论(0) 推荐(0)
摘要: import time import execjs import random import requests import json from fake_useragent import UserAgent class YouDaoTanslate(): def __init__(self): # 阅读全文
posted @ 2020-09-10 09:28 不可描述的细节 阅读(132) 评论(0) 推荐(0)
摘要: import loggingimport pymongoimport osimport pandas as pdimport numpy as npfrom tqdm import tqdmdef excel_mongo(file_path, db_name, table_name, sheet_n 阅读全文
posted @ 2020-09-04 10:05 不可描述的细节 阅读(232) 评论(0) 推荐(0)
摘要: import reimport requestsfrom pyquery import PyQuery as pqurl = 'http://www.bytravel.cn/Scene/mu.html'def get_page_content(url): headers={ 'User-Agent' 阅读全文
posted @ 2020-09-04 10:01 不可描述的细节 阅读(313) 评论(0) 推荐(0)
摘要: 网站名称: http://yw.eywedu.com/24/ 使用requests 抓取的网页编码格式 为GB2313 使用 response.text 乱码 使用response.content.decode('utf8') 或者 GBK 解码 报错 解决办法: while True: ht_re 阅读全文
posted @ 2020-05-18 16:35 不可描述的细节 阅读(140) 评论(0) 推荐(0)
摘要: import json import os.path import queue import threading import time import pandas as pd import requests from lxml import etree import re from urllib 阅读全文
posted @ 2020-04-27 15:57 不可描述的细节 阅读(686) 评论(0) 推荐(0)
摘要: 微博采集 采集微博数据 将数据存入mongo 所有链接存mongo中 下载器 专门从mongo 中取数据然后下载,下载完后修改mongo中字段的名称,避免重复使用数据 阅读全文
posted @ 2019-08-09 09:47 不可描述的细节 阅读(262) 评论(0) 推荐(0)