Skip to content
This repository was archived by the owner on Jun 15, 2021. It is now read-only.

Conversation

ChanCherry
Copy link

项目中的部分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,有做的不对的地方请见谅)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant