This repository was archived by the owner on Jun 15, 2021. It is now read-only.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
项目中的部分py代码因为python版本问题,在python3版本下运行会报错,一般会报错:
#common.py
import urlparse
No module named 'urlparse'
#request.py
import urllib2
No module named 'urllib2'
因为python3版本中已经将urllib2、urlparse并入了urllib模块中,并且修改urllib模块,其中包含5个子模块:urllib.error,urllib.parse,urllib.request,urllib.response,urllib.robotparser。还有python2和python3版本的try-catch也有点不同。 只有lib文件夹中的common.py和request.py有这个问题,所以我对common.py和request.py这两个文件做出了相应修改。(第一次提交pr,有做的不对的地方请见谅)