摘要: 最近迷上了三体小说,网上小说基本上都是分章节一篇一篇的人肉ctrl c v实在是太low了。干脆自己写个脚本吧,一劳永逸。 基本思路: 1、获取小说首页所有的章节名称和链接 2、使用异步请求所有的章节网页 3、根据网页内容使用xpath提取章节文本,再分章节存储 实现如下: """ -*- codi 阅读全文
posted @ 2020-10-07 14:26 GadyPu 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 平时偶尔在微信上玩一些小游戏,某天发现一款称之为《最强连一连》的益智游戏,具体玩法概括就是"一笔画"的问题。玩了几关之后随着游戏的格子数量的增加,感觉自己的算力不够用了【汗】于是打算写个脚本用于辅助。 一、开发环境配置 windows环境下搭建好python编程环境,本人使用python3.8.3版 阅读全文
posted @ 2020-09-21 19:44 GadyPu 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 由于自己平时喜欢在b站看看番剧、学习视频之类的,恰好这段时间等了好几年的Re0 season2开始更新了,打算将视频全部保存到本地,于是打开pycharm开始干活… 一、预期目标 下载非大会员视频,最高1080p画质 使用多线程下载加快下载速度 鉴于本地网络环境不佳、考虑加入断点续传功能 支持终端^ 阅读全文
posted @ 2020-09-03 14:02 GadyPu 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 不知从何时开始我们手机音乐app里的歌单,好多歌曲不是变灰了就是变成vip歌曲,普通用户只能试听几十秒,作为一名白嫖党怎么能忍,干脆撸起袖子自己动手把喜欢的歌曲全部保存下来。 一、目标网站 咕米音乐网页版:https://music.migu.cn/v3说句题外话我觉得咕米音乐这个网站真的挺良心的, 阅读全文
posted @ 2020-08-25 17:51 GadyPu 阅读(3032) 评论(1) 推荐(0) 编辑
摘要: 最近在学习python爬虫,在爬取某些网站的时候需要提交加密数据,于是记录下爬取过程, 以供自己学习、存档。 一、目标网站 中国空气质量在线监测分析平台收录了全国367个城市的PM2.5及天气信息数据, 具体包括AQI, PM2.5, PM10, S02, N02, O3, CO, 温度,湿度,风级 阅读全文
posted @ 2020-08-18 17:22 GadyPu 阅读(2434) 评论(0) 推荐(0) 编辑
摘要: 好久也没写过博客了,距离上一写的博文到现在也过去了四年。这段时间Urumqi yq突然爆发,单位暂时也不让回。一个人宅着没事就刷刷抖音看看短视频,作为一位有故事的男人【狗头】,抖音推荐的视频还是挺符合个人口味的,于是就萌生了把这些好看的视频全部保存的想法。之前喜欢用一些免费的公众号小程序去下载无水印 阅读全文
posted @ 2020-08-13 00:14 GadyPu 阅读(2211) 评论(1) 推荐(1) 编辑
摘要: 题目连接 https://leetcode.com/problems/word-ladder-ii/ Word Ladder II Description Given two words (beginWord and endWord), and a dictionary's word list, f 阅读全文
posted @ 2016-06-30 21:55 GadyPu 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/valid-perfect-square/ Valid Perfect Square Description Given a positive integer num, write a function which returns 阅读全文
posted @ 2016-06-30 21:14 GadyPu 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/reconstruct-itinerary/ Reconstruct Itinerary Description Given a list of airline tickets represented by pairs of de 阅读全文
posted @ 2016-06-23 23:09 GadyPu 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/invert-binary-tree/ Invert Binary Tree Description Invert a binary tree. to 阅读全文
posted @ 2016-06-23 22:44 GadyPu 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/ Convert Sorted List to Binary Search Tree Description Given a singly lin 阅读全文
posted @ 2016-06-23 22:36 GadyPu 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ Convert Sorted Array to Binary Search Tree Description Given an array w 阅读全文
posted @ 2016-06-23 22:29 GadyPu 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/4sum/ 4Sum Description Given an array $S$ of n integers, are there elements $a, b, c,$ and d in $S$ such that $a + 阅读全文
posted @ 2016-06-22 21:57 GadyPu 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/simplify-path/ Simplify Path Description Given an absolute path for a file (Unix-style), simplify it. For example,p 阅读全文
posted @ 2016-06-19 22:25 GadyPu 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/regular-expression-matching/ Regular Expression Matching Description Implement regular expression matching with sup 阅读全文
posted @ 2016-06-19 22:07 GadyPu 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/substring-with-concatenation-of-all-words/ Substring with Concatenation of All Words Description You are given a st 阅读全文
posted @ 2016-06-19 22:00 GadyPu 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 题目连接 https://leetcode.com/problems/design-twitter Design Twitte Description Design a simplified version of Twitter where users can post tweets, follow 阅读全文
posted @ 2016-06-12 19:41 GadyPu 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/lru-cache/LRU CacheDescriptionDesign and implement a data structure for Least Recently Used (LRU) cache. It should s... 阅读全文
posted @ 2015-12-11 21:30 GadyPu 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/3sum/3SumDescriptionGiven an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find al... 阅读全文
posted @ 2015-12-11 21:15 GadyPu 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/letter-combinations-of-a-phone-number/Letter Combinations of a Phone NumberDescriptionGiven a digit string, return a... 阅读全文
posted @ 2015-12-11 21:08 GadyPu 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/remove-nth-node-from-end-of-list/Remove Nth Node From End of ListDescriptionGiven a linked list, remove the $n^{th}$... 阅读全文
posted @ 2015-12-11 21:05 GadyPu 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/valid-parentheses/Valid ParenthesesDescriptionGiven a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ ... 阅读全文
posted @ 2015-12-11 21:02 GadyPu 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/merge-k-sorted-lists/Merge k Sorted ListsDescriptionMerge k sorted linked lists and return it as one sorted list. An... 阅读全文
posted @ 2015-12-11 20:58 GadyPu 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/remove-element/Remove ElementDescriptionGiven an array and a value, remove all instances of that value in place and ... 阅读全文
posted @ 2015-12-11 20:55 GadyPu 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/implement-strstr/Implement strStr()DescriptionImplement strStr().Returns the index of the first occurrence of needle... 阅读全文
posted @ 2015-12-11 20:53 GadyPu 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/longest-valid-parentheses/Longest Valid ParenthesesDescriptionGiven a string containing just the characters ‘(’ and ... 阅读全文
posted @ 2015-12-11 20:47 GadyPu 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/valid-sudoku/Valid SudokuDescriptionDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudo... 阅读全文
posted @ 2015-12-11 20:44 GadyPu 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/sudoku-solver/Sudoku SolverDescriptionWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cell... 阅读全文
posted @ 2015-12-11 20:39 GadyPu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/count-and-say/Count and SayDescriptionThe count-and-say sequence is the sequence of integers beginning as follows:1,... 阅读全文
posted @ 2015-12-11 20:34 GadyPu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/multiply-strings/Multiply StringsDescriptionGiven two numbers represented as strings, return multiplication of the n... 阅读全文
posted @ 2015-12-11 20:26 GadyPu 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/anagrams/Group AnagramsDescriptionGiven an array of strings, group anagrams together.For example, given: [“eat”, “te... 阅读全文
posted @ 2015-12-11 20:21 GadyPu 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/spiral-matrix/Spiral MatrixDescriptionGiven a matrix of m x n elements (m rows, n columns), return all elements of t... 阅读全文
posted @ 2015-12-11 20:15 GadyPu 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/length-of-last-word/Length of Last WordDescriptionGiven a string s consists of upper/lower-case alphabets and empty ... 阅读全文
posted @ 2015-12-11 20:12 GadyPu 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/plus-one/Plus OneDescriptionGiven a non-negative number represented as an array of digits, plus one to the number.Th... 阅读全文
posted @ 2015-12-09 20:44 GadyPu 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/add-binary/Add BinaryDescriptionGiven two binary strings, return their sum (also a binary string).For example,a = “1... 阅读全文
posted @ 2015-12-09 20:42 GadyPu 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/search-a-2d-matrix/Search a 2D MatrixDescriptionWrite an efficient algorithm that searches for a value in an m x n m... 阅读全文
posted @ 2015-12-09 20:40 GadyPu 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/word-search/Word SearchDescriptionGiven a 2D board and a word, find if the word exists in the grid.The word can be c... 阅读全文
posted @ 2015-12-09 20:37 GadyPu 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/path-sum/Path Sum/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; *... 阅读全文
posted @ 2015-12-09 20:33 GadyPu 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/path-sum-ii/Path Sum II/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *l... 阅读全文
posted @ 2015-12-09 20:31 GadyPu 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/flatten-binary-tree-to-linked-list/Flatten Binary Tree to Linked ListDescription/** * Definition for a binary tree n... 阅读全文
posted @ 2015-12-09 20:29 GadyPu 阅读(130) 评论(0) 推荐(0) 编辑