-
Notifications
You must be signed in to change notification settings - Fork 1k
Sourcery Starbot ⭐ refactored wkunzhi/Python3-Spider #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to GitHub API limits, only the first 60 comments can be shown.
【bilibili】自动登录/login.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function LoginBli.is_pixel_similar refactored with the following changes:
- Lift code into else after jump in control flow (
reintroduce-else) - Replace if statement with if expression (
assign-if-exp) - Simplify boolean if expression (
boolean-if-exp-identity) - Remove unnecessary casts to int, str, float or bool (
remove-unnecessary-cast)
【bilibili】自动登录/login.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function LoginBli.get_track refactored with the following changes:
- Replace if statement with if expression (
assign-if-exp)
This removes the following comments ( why? ):
# 加速度为正2
# 加速度为负3
【bilibili】视频下载/video_download.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function DownVideo.get_cid_list refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ3] (
use-fstring-for-concatenation)
【bilibili】视频下载/video_download.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function DownVideo.get_play_list refactored with the following changes:
- Replace interpolated string formatting with f-string ×ばつ2] (
replace-interpolation-with-fstring) - Inline variable that is immediately returned (
inline-immediately-returned-variable)
【bilibili】视频下载/video_download.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function DownVideo.schedule_cmd refactored with the following changes:
- Replace interpolated string formatting with f-string (
replace-interpolation-with-fstring)
【大众点评】字体反爬、坐标反爬/旧版/parse_font_css.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function DianPing.get_css_offset refactored with the following changes:
- Convert for loop into dictionary comprehension (
dict-comprehension) - Inline variable that is only used once ×ばつ3] (
inline-variable) - Inline variable that is immediately returned (
inline-immediately-returned-variable)
【大众点评】字体反爬、坐标反爬/旧版/parse_font_css.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function DianPing.get_svg_url_dict refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
【大众点评】字体反爬、坐标反爬/旧版/parse_font_css.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function DianPing.get_comment_num refactored with the following changes:
- Replace call to format with f-string (
use-fstring-for-formatting)
【大众点评】字体反爬、坐标反爬/最新版7月/main.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function ParseFontClass.parse_ttf refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ2] (
use-fstring-for-concatenation)
【大众点评】字体反爬、坐标反爬/最新版7月/main.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function ParseFontClass.install_ttf refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ4] (
use-fstring-for-concatenation)
This removes the following comments ( why? ):
# 下载写入
# 用完了删掉,节省资源占用
【天眼查】字体加密/tyc.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 18-18 refactored with the following changes:
- Replace list(), dict() or set() with comprehension (
collection-builtin-to-comprehension) - Replace unneeded comprehension with generator (
comprehension-to-generator)
This removes the following comments ( why? ):
# 对应关系数量转换
【抖音】无水印视频解析/parse.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function ParseVideo.__init__ refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ2] (
use-fstring-for-concatenation)
【抖音】无水印视频解析/parse.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function ParseVideo.go_location refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
【抖音】无水印视频解析/parse.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function ParseVideo.go_message refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ3] (
use-fstring-for-concatenation)
【文书】app查询接口/main.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function TripleDesUtils.decrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【Python加密库】Demo/encryption.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function UseRSA.check_sign refactored with the following changes:
- Ensure constant in comparison is on the right (
flip-comparison) - Use x is None rather than x == None (
none-compare)
其他实战/【Python加密库】Demo/encryption.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function UseDES.encrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【Python加密库】Demo/encryption.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function UseDES3.encrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【Python加密库】Demo/encryption.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function UseDES3.decrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【Python加密库】Demo/encryption.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function use_sha refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【steam】自动登录/login.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function main refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【中关村】自动登录/login.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function ZGC.login refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【中关村】自动登录/login.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function ZGC.make_md5 refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation) - Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【天翼】登录/login.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function login refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ11] (
use-fstring-for-concatenation)
其他实战/【好莱客】参数解析/holike.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function MakeParam.get_key_vi refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【满级网】自动登录/auto_login.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function YX.make_data refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
其他实战/【百度】wap端sig生成/make_sig.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 17-17 refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
其他实战/【百度】网页找回密码/demo.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function BaiDu.make_dv refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ2] (
use-fstring-for-concatenation) - Remove unnecessary calls to
str()from formatted values in f-strings (remove-str-from-fstring)
其他实战/【百度】网页找回密码/demo.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function BaiDu.get_img refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
其他实战/【百度】网页找回密码/demo.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function BaiDu.get_phone refactored with the following changes:
- Use f-string instead of string concatenation ×ばつ2] (
use-fstring-for-concatenation)
Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨
Here's your pull request refactoring your most popular Python repo.
If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.
Review changes via command line
To manually merge these changes, make sure you're on the
masterbranch, then run: