摘要: """author:张鑫date:2021/5/31 15:06"""def ascii_chineses(a): a = a.encode('ascii').decode('unicode_escape') print(a)if __name__ == '__main__': a = r'\u56 阅读全文
posted @ 2021-10-20 16:46 布都御魂 阅读(438) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/5/31 15:11"""def c_a(name): name = name.encode('unicode_escape').decode('ascii') print(name)if __name__ == '__main__': name = '返 阅读全文
posted @ 2021-10-20 16:46 布都御魂 阅读(115) 评论(0) 推荐(0) 编辑
摘要: # coding:UTF-8import timedef time_turns(time1): if '小時' in time1: time2 = str(int(time.time()) - int(time1.split('小')[0]) * 3600) return time2 if '小时' 阅读全文
posted @ 2021-10-20 16:22 布都御魂 阅读(118) 评论(0) 推荐(0) 编辑
摘要: """ author:张鑫 date:2021/7/30 20:39 """ import time def time_turn(timenum): if 0 < len(timenum) < 11 and timenum.isdigit(): timenum = int(timenum) time 阅读全文
posted @ 2021-10-20 16:21 布都御魂 阅读(186) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/7/23 17:16""""""author:张鑫date:2021/7/20 10:00"""import pymysqlconnect = pymysql.Connect( host='192.168.1.117', port=3306, user=' 阅读全文
posted @ 2021-10-20 16:18 布都御魂 阅读(34) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/8/13 16:37"""import pymysql# 即将插入的数据# url2 = ''connect = pymysql.Connect( host='140.210.4.73', port=3306, user='twipad_cj', pass 阅读全文
posted @ 2021-10-20 16:17 布都御魂 阅读(332) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/5/19 15:38"""# 导入模块import timeimport pymongoimport randomimport reimport pandas as pdimport numpy as np# 连接数据库database = pymongo 阅读全文
posted @ 2021-10-20 16:01 布都御魂 阅读(125) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/6/24 16:31"""# 上取整from math import ceilnum1 = ceil(1.11)print(num1)num2 = ceil(90/20)print(num2)# 下取整num3 = int(1.11)print(num3) 阅读全文
posted @ 2021-10-20 15:59 布都御魂 阅读(48) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/6/24 14:30"""import redef remove_label(content): if '<' in content: pre = re.compile('>(.*?)<') content = content.replace('&nbsp 阅读全文
posted @ 2021-10-20 15:51 布都御魂 阅读(46) 评论(0) 推荐(0) 编辑
摘要: # coding=gbkimport xlsxwriter as xwimport requestsimport reimport jsonimport timeimport randomfrom fake_useragent import UserAgentimport randomdef get 阅读全文
posted @ 2021-10-20 15:43 布都御魂 阅读(16) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/8/12 10:48"""def today_start(): import time import datetime today = datetime.date.today() today_time = int(time.mktime(today.tim 阅读全文
posted @ 2021-10-20 15:40 布都御魂 阅读(12) 评论(0) 推荐(0) 编辑
摘要: import randomfrom time import sleepfrom selenium import webdriverfrom lxml import etreefrom selenium.webdriver import ActionChainsurl = []# 初始页面地址urls 阅读全文
posted @ 2021-10-20 15:34 布都御魂 阅读(61) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/10/14 17:14"""import paramikoip = "140.210.4.73" # 服务器ipport = 22 # 端口号username = "zs_caoye" # 用户名password = "zs_caoye#@!s" # 密码 阅读全文
posted @ 2021-10-20 15:07 布都御魂 阅读(31) 评论(0) 推荐(0) 编辑
摘要: """author:张鑫date:2021/10/14 17:14"""import timeimport paramikoimport requestsfrom lxml import etreefrom selenium import webdriverkeyword = 'SandyHsu31 阅读全文
posted @ 2021-10-20 15:06 布都御魂 阅读(50) 评论(0) 推荐(0) 编辑