Python Wechat

admin

折腾:

WeeChat, the extensible chat client. Scripts; Unofficial scripts; Python 3; WeeChat official scripts. This page shows a collection of WeeChat scripts written by external contributors, which can be installed directly in WeeChat with the command /script install. Of web crawler advantages, Finally, a Python-based WeChat public platform reptile system. Was designed to successfully obtain data. The crawled data can be used for market research. 自从微信禁止网页版登陆之后,itchat 库实现的功能也就都不能用了,那现在 Python 还能操作微信吗?答案是还可以。 目前有一个项目 WechatPCAPI 可以对微信进行操作,简单来说它是直接操作 PC 版微信客户.

期间,去安装wechat-sdk

Collecting wechat-sdk
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fc8b59d7650>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/wechat-sdk/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fc8b59d77d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/wechat-sdk/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fc8b59d7950>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/wechat-sdk/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fc8b59d7ad0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/wechat-sdk/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fc8b59d7c50>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/wechat-sdk/
Could not find a version that satisfies the requirement wechat-sdk (from versions: )
(SIPEvents) SIPEvents easy_install install wechat-sdk
Reading https://pypi.python.org/simple/install/
Download error on https://pypi.python.org/simple/install/: [Errno -2] Name or service not known — Some packages may not be found!
Couldn’t find index page for ‘install’ (maybe misspelled?)
Scanning index of all packages (this may take a while)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known — Some packages may not be found!
No local packages or working download links found for install
error: Could not find suitable distribution for Requirement.parse(‘install’)

去通过源码安装:

wget https://github.com/wechat-python-sdk/wechat-python-sdk/archive/master.tar.gz
cd wechat-python-sdk-master
python setup.py install

最后还是出错:

(SIPEvents) SIPEvents wget https://github.com/wechat-python-sdk/wechat-python-sdk/archive/master.tar.gz

<div–<2016-08-17 15:35:43– https://github.com/wechat-python-sdk/wechat-python-sdk/archive/master.tar.gz

Connecting to github.com 192.30.253.112 :443… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: https://github.com/doraemonext/wechat-python-sdk/archive/master.tar.gz [following]

<div–<2016-08-17 15:35:44– https://github.com/doraemonext/wechat-python-sdk/archive/master.tar.gz

Connecting to github.com 192.30.253.112 :443… connected.
Location: https://codeload.github.com/doraemonext/wechat-python-sdk/tar.gz/master [following]

<div–<2016-08-17 15:35:47– https://codeload.github.com/doraemonext/wechat-python-sdk/tar.gz/master

Connecting to codeload.github.com 192.30.253.121 :443… connected.
Length: unspecified [application/x-gzip]
2016-08-17 15:35:51 (116 KB/s) – aster.tar.gzsaved [200457]
(SIPEvents) SIPEvents ll
-rw-r–r– 1 root root 735 Aug 17 14:39 flash.py
-rw-r–r– 1 root root 707 Aug 16 15:23 hello.py
-rw-r–r– 1 root root 196K Aug 17 15:35 master.tar.gz
drwxr-xr-x 2 root root 4.0K Aug 17 14:38 templates
wechat-python-sdk-master/
wechat-python-sdk-master/CONTRIBUTORS.txt
wechat-python-sdk-master/MANIFEST.in
wechat-python-sdk-master/docs/
wechat-python-sdk-master/docs/docs/
Download error on https://pypi.python.org/simple/xmltodict/: [Errno -2] Name or service not known — Some packages may not be found!
Couldn’t find index page for ‘xmltodict’ (maybe misspelled?)
Scanning index of all packages (this may take a while)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known — Some packages may not be found!
No local packages or working download links found for xmltodict0.9.2
error: Could not find suitable distribution for Requirement.parse(‘xmltodict0.9.2’)

error: Could not find suitable distribution for Requirement.parse(‘xmltodict0.9.2’)

error: Could not find suitable distribution for xmltodict

Wechat

Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/wechat-sdk/

Failed to establish a new connection /simple/wechat-sdk

No matching distribution found for wechat-sdk

No matching distribution found for wechat-sdk

Could not find suitable distribution for Requirement.parse

根据之前的:

Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known — Some packages may not be found!
No local packages or working download links found for xmltodict0.9.2
error: Could not find suitable distribution for Requirement.parse(‘xmltodict0.9.2’)

去尝试安装那个所谓的:

xmltodict0.9.2

搜:

python xmltodict 0.9.2

(SIPEvents) wechat-python-sdk-master pip install xmltodict
Downloading xmltodict-0.10.2.tar.gz
Running setup.py bdist_wheel for xmltodict … done
Stored in directory: /root/.cache/pip/wheels/2a/dc/70/da8958d7089d994c8614bc38210f64855f09615e85707bf615
Installing collected packages: xmltodict

Python Itchat

再去:

python setup.py build

python setup.py install

(SIPEvents) wechat-python-sdk-master python setup.py build
running build_py
writing requirements to wechat_sdk.egg-info/requires.txt
writing top-level names to wechat_sdk.egg-info/top_level.txt
writing dependency_links to wechat_sdk.egg-info/dependency_links.txt
reading manifest file ‘wechat_sdk.egg-info/SOURCES.txt’
warning: no files found matching ‘docs/*.rst’
warning: no files found matching ‘docs/Makefile’
writing manifest file ‘wechat_sdk.egg-info/SOURCES.txt’
(SIPEvents) wechat-python-sdk-master python setup.py install
running bdist_egg
writing requirements to wechat_sdk.egg-info/requires.txt
no previously-included directories found matching ‘documentation/_build’
zip_safe flag not set; analyzing archive contents…
creating /root/Envs/SIPEvents/lib/python2.7/site-packages/six-1.10.0-py2.7.egg
Extracting six-1.10.0-py2.7.egg to /root/Envs/SIPEvents/lib/python2.7/site-packages
Installed /root/Envs/SIPEvents/lib/python2.7/site-packages/six-1.10.0-py2.7.egg
Finished processing dependencies for wechat-sdk0.6.4
Python Wechat

期间,安装了所依赖的库:

xmltodict0.9.2

pycrypto2.6.1

requests2.6.0

Python Wechaty

six1.10.0

Python Wechat

最终安装了:

Wechat Api

wechat-sdk0.6.4

Python Wechatpy

转载请注明:在路上 » [记录]安装Python微信SDK包:wechat-sdk