
Python
ayangyangyang25
这个作者很懒,什么都没留下…
展开
-
【python基础】
=函数的默认值是在函数定义的过程计算的,并且只会计算一次。此时调用f(1)、f(2)、f(3),返回[1],[2],[3]原创 2023-07-07 16:08:37 · 80 阅读 · 0 评论 -
【leetcode】【字符串】两数之和
题目:给定一个整数数组 nums和一个目标值 target,请你在该数组中找出和为目标值的那两个整数,并返回他们的数组下标。你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。示例:给定 nums = [2, 7, 11, 15], target = 9因为 nums[0] + nums[1] = 2 + 7 = 9所以返回 [0, 1]来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/two-s...原创 2020-08-18 15:51:49 · 241 阅读 · 0 评论 -
线程爬虫
普通爬糗事百科段子import urllib.requestimport reimport urllib.errorheaders = ("User-Agent",'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537...原创 2019-07-31 15:30:55 · 108 阅读 · 0 评论 -
图片爬虫(未解决)
淘宝图片爬取1.找到对应网址找出规律,s=后面的数为一页加60https://s.taobao.com/list?q=短裙&cat=16&style=grid&seller_type=taobao&spm=a217f.8051907.1000187.1&bcoffset=0&s=02.分析某图片地址,到源代码中搜索https://g-...原创 2019-07-29 16:44:32 · 125 阅读 · 0 评论