09 2023 档案

摘要:import urllib.request import urllib.parse headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 阅读全文
posted @ 2023-09-30 22:05 sgj191024 阅读(57) 评论(0) 推荐(0) 编辑
摘要:import urllib.request import urllib.parse import json def getKenData(index): headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Appl 阅读全文
posted @ 2023-09-30 20:14 sgj191024 阅读(12) 评论(0) 推荐(0) 编辑
摘要:import urllib.request url = 'https://movie.douban.com/j/chart/top_list?type=5&interval_id=100%3A90&action=&start=0&limit=20' headers = { 'User-Agent': 阅读全文
posted @ 2023-09-30 19:49 sgj191024 阅读(106) 评论(0) 推荐(0) 编辑
摘要:原始数据: from: en to: zh query: love transtype: realtime simple_means_flag: 3 sign: 198772.518981 token: 1b434ed1e595135ac1b2959f4430a51f domain: common 阅读全文
posted @ 2023-09-30 15:46 sgj191024 阅读(106) 评论(0) 推荐(0) 编辑
摘要:import urllib.request import urllib.parse headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 阅读全文
posted @ 2023-09-30 15:41 sgj191024 阅读(58) 评论(0) 推荐(0) 编辑
摘要:import urllib.request url = "http://www.baidu.com" response = urllib.request.urlopen(url) content = response.read().decode('utf-8') print(content) 如果不 阅读全文
posted @ 2023-09-30 13:42 sgj191024 阅读(15) 评论(0) 推荐(0) 编辑
摘要:json序列号和反序列化: file1 = open('test1.txt','r') content = file1.read() print(content) result = json.loads(content) print(result) print(type(result)) for i 阅读全文
posted @ 2023-09-30 09:20 sgj191024 阅读(24) 评论(0) 推荐(0) 编辑
摘要:在python,使用open函数,可以打开一个已经存在的文件,或者创建一个新文件 open(文件路径,访问模式) f = open('test.txt', 'w') 读文件: f1 = open('test1.txt','r')content = f1.read()print(content)rea 阅读全文
posted @ 2023-09-30 01:36 sgj191024 阅读(5) 评论(0) 推荐(0) 编辑
摘要:1、python数据类型: 列表对应Java中的list可以添加删除元素,格式是中括号,A = ['xiaoWang','xiaoZhang','xiaoHua']; 元组对应Java中的数组,长度是固定的不能修改,格式是小括号,tuple = ('刘备','关于','张飞'); 字典对应Java中 阅读全文
posted @ 2023-09-29 16:32 sgj191024 阅读(8) 评论(0) 推荐(0) 编辑
摘要:package com.java.kexin; public class LinkListTest { public static void main(String[] args) { SingleLinkList singleLinkList = new SingleLinkList(); sin 阅读全文
posted @ 2023-09-06 00:01 sgj191024 阅读(5) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示