Giter Club home page Giter Club logo

12306-booking's Introduction

12306-booking

12306订票工具

12306booking vs 12306 vs 第三方订票平台

为什么要写一个订票工具?

  1. 12306订票体验太差。验证码识别太逆天,人眼无法识别。刷新、刷新、刷新,刷到手疼。票就在那里,你就是定不上
  2. 第三方订票平台太流氓。收集用户数据,还收不可接受的手续费(美其名曰技术服务费,其实就是 CPU和 RAM),最恐怖的是还要将用户数据拿到市场交易

解决了什么问题,有什么优点?

  1. 两次扫码就完成了登录、查询余票、下单到支付的所有流程
  2. 本地运行,不收集任何用户数据,不用输入用户密码,不用担心任何数据泄露、交易行为
  3. 完全开源,没有任何黑箱操作
  4. 刷新、订票流程快,先人一步抢到票
  5. 支持多车次、多席别、多乘客抢票

使用说明

安装

pip install 12306-booking -U --user;

如果使用MacOS,使用虚拟环境安装virtualenv venv; source venv/bin/activate; pip install 12306-booking -U

订票

12306-booking --train-date 2020-01-01 --train-names K571 --seat-types 硬卧 --from-station 北京 --to-station 麻城 --pay-channel 微信 --passengers 任正非,王石

多车次、多席别、多乘客之间用英文的','分割

订票流程

订票流程

订票状态机

订票状态机

赞助

如果有帮助到你订到票,请扫描二维码赞赏我们,你的鼓励是我们持续改进优化的动力。

12306-booking's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

12306-booking's Issues

可以设置代理吗

我试了下用这个买还剩很多票的车次,但是一样买不到,怀疑是封了ip,所以想问下可不可以设置代理,通过ip代理买票呢?

提交订单失败

试了下用这个买还剩很多票的车次,提交订单失败,一直在排队中。

安装出现下面错误

环境Ubuntu 16.04 python

 pip3 install 12306-booking 

Collecting 12306-booking
  Using cached https://files.pythonhosted.org/packages/37/f1/f5d6fac51d495bc54cf741b61c07c8f84026f8ab8cf28cd36b09bd886e61/12306-booking-0.1.7.tar.gz
Collecting Pillow>=5.4.1 (from 12306-booking)
  Using cached https://files.pythonhosted.org/packages/8b/e9/5c47710fe383f0582da668302a80a6355fe15c2ce2dde89b50fe34acefa6/Pillow-5.4.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting hack12306>=0.1.11 (from 12306-booking)
  Using cached https://files.pythonhosted.org/packages/8f/e6/9333a5e7065e5579fea06c31fcde471d9e6b61a5c8cb3cb55b9b79e15cb4/hack12306-0.1.11.tar.gz
Collecting click==7.0 (from 12306-booking)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.12.4 in /usr/local/lib/python3.5/dist-packages (from hack12306>=0.1.11->12306-booking) (2.18.4)
Collecting BeautifulSoup>=3.2.1 (from hack12306>=0.1.11->12306-booking)
  Using cached https://files.pythonhosted.org/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-u42wkmkd/BeautifulSoup/setup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: Missing parentheses in call to 'print'
    
    ----------------------------------------

MacOS python3.6 安装报错

MacOS 10.13.4
python 3.6

➜  python source 12306/bin/activate
(12306) ➜  python pip install 12306-booking -U
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting 12306-booking
  Downloading http://mirrors.aliyun.com/pypi/packages/6d/8a/3b85ece5443783fa7bc57a63ff7a5286b3c182102ff5c4604faa6d10648a/12306-booking-0.1.8.tar.gz (69kB)
    100% |████████████████████████████████| 71kB 2.0MB/s
Collecting Pillow>=5.4.1 (from 12306-booking)
  Downloading http://mirrors.aliyun.com/pypi/packages/81/96/05a5c9ba4a75ed330234780e4ae30018bbf77c847982ff6a16b8b291a0da/Pillow-5.4.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 8.9MB/s
Collecting hack12306>=0.1.11 (from 12306-booking)
  Downloading http://mirrors.aliyun.com/pypi/packages/8f/e6/9333a5e7065e5579fea06c31fcde471d9e6b61a5c8cb3cb55b9b79e15cb4/hack12306-0.1.11.tar.gz
Collecting click==7.0 (from 12306-booking)
  Downloading http://mirrors.aliyun.com/pypi/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
    100% |████████████████████████████████| 81kB 13.4MB/s
Collecting requests>=2.12.4 (from hack12306>=0.1.11->12306-booking)
  Downloading http://mirrors.aliyun.com/pypi/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
    100% |████████████████████████████████| 61kB 9.8MB/s
Collecting BeautifulSoup>=3.2.1 (from hack12306>=0.1.11->12306-booking)
  Downloading http://mirrors.aliyun.com/pypi/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/x8/q83ds71n311bt_4331540p6h0000gn/T/pip-install-dsunu4a1/BeautifulSoup/setup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "Unit tests have failed!")?

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/x8/q83ds71n311bt_4331540p6h0000gn/T/pip-install-dsunu4a1/BeautifulSoup/

python2.7 安装报错

ubuntu16.04 python2.7
python2 -m pip install 12306-booking
Collecting 12306-booking
Using cached https://files.pythonhosted.org/packages/6d/8a/3b85ece5443783fa7bc57a63ff7a5286b3c182102ff5c4604faa6d10648a/12306-booking-0.1.8.tar.gz
Collecting Pillow>=5.4.1 (from 12306-booking)
Using cached https://files.pythonhosted.org/packages/0d/f3/421598450cb9503f4565d936860763b5af413a61009d87a5ab1e34139672/Pillow-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting hack12306>=0.1.11 (from 12306-booking)
Collecting click==7.0 (from 12306-booking)
Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting BeautifulSoup>=3.2.1 (from hack12306>=0.1.11->12306-booking)
Collecting requests>=2.12.4 (from hack12306>=0.1.11->12306-booking)
Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
Using cached https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Building wheels for collected packages: 12306-booking
Running setup.py bdist_wheel for 12306-booking ... error
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-52ie6m/12306-booking/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmp1mYiQppip-wheel- --python-tag cp27:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/booking
copying booking/query.py -> build/lib.linux-x86_64-2.7/booking
copying booking/utils.py -> build/lib.linux-x86_64-2.7/booking
copying booking/exceptions.py -> build/lib.linux-x86_64-2.7/booking
copying booking/pay.py -> build/lib.linux-x86_64-2.7/booking
copying booking/settings.py -> build/lib.linux-x86_64-2.7/booking
copying booking/order.py -> build/lib.linux-x86_64-2.7/booking
copying booking/user.py -> build/lib.linux-x86_64-2.7/booking
copying booking/run.py -> build/lib.linux-x86_64-2.7/booking
copying booking/auth.py -> build/lib.linux-x86_64-2.7/booking
copying booking/_logging.py -> build/lib.linux-x86_64-2.7/booking
copying booking/init.py -> build/lib.linux-x86_64-2.7/booking
copying booking/command.py -> build/lib.linux-x86_64-2.7/booking
creating build/lib.linux-x86_64-2.7/tests
copying tests/init.py -> build/lib.linux-x86_64-2.7/tests
running egg_info
writing requirements to 12306_booking.egg-info/requires.txt
writing 12306_booking.egg-info/PKG-INFO
writing top-level names to 12306_booking.egg-info/top_level.txt
writing dependency_links to 12306_booking.egg-info/dependency_links.txt
writing entry points to 12306_booking.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found

reading manifest file '12306_booking.egg-info/SOURCES.txt'
writing manifest file '12306_booking.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-52ie6m/12306-booking/setup.py", line 29, in
"Operating System :: OS Independent",
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 52, in run
self.build_package_data()
File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 107, in build_package_data
for package, src_dir, build_dir, filenames in self.data_files:
File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 65, in getattr
self.data_files = self._get_data_files()
File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 79, in _get_data_files
return list(map(self._get_pkg_data_files, self.packages or ()))
File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 91, in _get_pkg_data_files
for file in self.find_data_files(package, src_dir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 98, in find_data_files
+ self.package_data.get(package, []))
TypeError: cannot concatenate 'str' and 'list' objects


Failed building wheel for 12306-booking
Running setup.py clean for 12306-booking
Failed to build 12306-booking
Installing collected packages: Pillow, BeautifulSoup, certifi, chardet, idna, urllib3, requests, hack12306, click, 12306-booking
Running setup.py install for 12306-booking ... error
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-52ie6m/12306-booking/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-0Jd3DO-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/booking
copying booking/query.py -> build/lib.linux-x86_64-2.7/booking
copying booking/utils.py -> build/lib.linux-x86_64-2.7/booking
copying booking/exceptions.py -> build/lib.linux-x86_64-2.7/booking
copying booking/pay.py -> build/lib.linux-x86_64-2.7/booking
copying booking/settings.py -> build/lib.linux-x86_64-2.7/booking
copying booking/order.py -> build/lib.linux-x86_64-2.7/booking
copying booking/user.py -> build/lib.linux-x86_64-2.7/booking
copying booking/run.py -> build/lib.linux-x86_64-2.7/booking
copying booking/auth.py -> build/lib.linux-x86_64-2.7/booking
copying booking/_logging.py -> build/lib.linux-x86_64-2.7/booking
copying booking/init.py -> build/lib.linux-x86_64-2.7/booking
copying booking/command.py -> build/lib.linux-x86_64-2.7/booking
creating build/lib.linux-x86_64-2.7/tests
copying tests/init.py -> build/lib.linux-x86_64-2.7/tests
running egg_info
writing requirements to 12306_booking.egg-info/requires.txt
writing 12306_booking.egg-info/PKG-INFO
writing top-level names to 12306_booking.egg-info/top_level.txt
writing dependency_links to 12306_booking.egg-info/dependency_links.txt
writing entry points to 12306_booking.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found

reading manifest file '12306_booking.egg-info/SOURCES.txt'
writing manifest file '12306_booking.egg-info/SOURCES.txt'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-52ie6m/12306-booking/setup.py", line 29, in <module>
    "Operating System :: OS Independent",
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
    self.run_command('build')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 52, in run
    self.build_package_data()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 107, in build_package_data
    for package, src_dir, build_dir, filenames in self.data_files:
  File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 65, in __getattr__
    self.data_files = self._get_data_files()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 79, in _get_data_files
    return list(map(self._get_pkg_data_files, self.packages or ()))
  File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 91, in _get_pkg_data_files
    for file in self.find_data_files(package, src_dir)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 98, in find_data_files
    + self.package_data.get(package, []))
TypeError: cannot concatenate 'str' and 'list' objects

----------------------------------------

Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-52ie6m/12306-booking/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-0Jd3DO-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-52ie6m/12306-booking/

train-name参数应该改为train-names

大佬,你好!你的用法使用介绍时,下面的train-name参数应该改为train-names,否则会提示参数错误
123060-booking --train-date 2020-01-01 --train-name K571 --seat-types 硬卧 --from-station 北京 --to-station 麻城 --pay-channel 微信 --passengers 任正非,王石,

安装正常 执行报错找不到six模块

环境

  • mac OS 10.14.2
  • python_version = "2.7"

安装过程和报错信息:

[~/codelife/12306booking]$ pipenv --python 2
Creating a virtualenv for this project…
Using /usr/bin/python to create virtualenv…
⠋Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /User/home/.local/share/virtualenvs/12306booking-8aqe4YCo
Creating a Pipfile for this project…
[~/codelife/12306booking]$ pipenv shell
Spawning environment shell (/bin/zsh). Use 'exit' to leave.
source /User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/bin/activate
[~/codelife/12306booking]$ source /User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/bin/activate
(12306booking-8aqe4YCo) [~/codelife/12306booking]$ pip install 12306-booking
Collecting 12306-booking
  Downloading https://files.pythonhosted.org/packages/6d/8a/3b85ece5443783fa7bc57a63ff7a5286b3c182102ff5c4604faa6d10648a/12306-booking-0.1.8.tar.gz (69kB)
    100% |████████████████████████████████| 71kB 271kB/s
Collecting Pillow>=5.4.1 (from 12306-booking)
  Downloading https://files.pythonhosted.org/packages/7e/bb/d502ae951099ce9a5a20dec21e577f304b7706321f83205c5215ebc028cd/Pillow-5.4.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 135kB/s
Collecting hack12306>=0.1.11 (from 12306-booking)
  Downloading https://files.pythonhosted.org/packages/8f/e6/9333a5e7065e5579fea06c31fcde471d9e6b61a5c8cb3cb55b9b79e15cb4/hack12306-0.1.11.tar.gz
Collecting click==7.0 (from 12306-booking)
  Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
    100% |████████████████████████████████| 81kB 114kB/s
Collecting requests>=2.12.4 (from hack12306>=0.1.11->12306-booking)
  Downloading https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
    100% |████████████████████████████████| 61kB 106kB/s
Collecting BeautifulSoup>=3.2.1 (from hack12306>=0.1.11->12306-booking)
  Downloading https://files.pythonhosted.org/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz
Collecting urllib3<1.25,>=1.21.1 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
  Downloading https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl (118kB)
    100% |████████████████████████████████| 122kB 170kB/s
Collecting certifi>=2017.4.17 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
  Downloading https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl (154kB)
    100% |████████████████████████████████| 163kB 225kB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 208kB/s
Collecting idna<2.9,>=2.5 (from requests>=2.12.4->hack12306>=0.1.11->12306-booking)
  Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 161kB/s
Building wheels for collected packages: 12306-booking, hack12306, BeautifulSoup
  Running setup.py bdist_wheel for 12306-booking ... done
  Stored in directory: /User/home/Library/Caches/pip/wheels/1e/62/71/1d1ba512ea83693ccea926a25771dd7045687ed0d89c6d4c61
  Running setup.py bdist_wheel for hack12306 ... done
  Stored in directory: /User/home/Library/Caches/pip/wheels/b8/77/a7/fc8c50ed3e78e56f19cf7816dc072461d15d9c08599a0b1054
  Running setup.py bdist_wheel for BeautifulSoup ... done
  Stored in directory: /User/home/Library/Caches/pip/wheels/74/d2/0b/8ef02aab9e15c6e5158d7aee909adab931a9c54920e99f468e
Successfully built 12306-booking hack12306 BeautifulSoup
Installing collected packages: Pillow, urllib3, certifi, chardet, idna, requests, BeautifulSoup, hack12306, click, 12306-booking
Successfully installed 12306-booking-0.1.8 BeautifulSoup-3.2.1 Pillow-5.4.1 certifi-2018.11.29 chardet-3.0.4 click-7.0 hack12306-0.1.11 idna-2.8 requests-2.21.0 urllib3-1.24.1
(12306booking-8aqe4YCo) [~/codelife/12306booking]$
(12306booking-8aqe4YCo) [~/codelife/12306booking]$ 12306-booking
Traceback (most recent call last):
  File "/User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/bin/12306-booking", line 7, in <module>
    from booking.command import booking
  File "/User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages/booking/command.py", line 16, in <module>
    from .run import initialize, run as booking_run_loop
  File "/User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages/booking/run.py", line 16, in <module>
    from hack12306.constants import (BANK_ID_WX, BANK_ID_MAP, SEAT_TYPE_CODE_MAP,)
  File "/User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages/hack12306/__init__.py", line 11, in <module>
    from .pay import TrainPayAPI
  File "/User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages/hack12306/pay.py", line 19, in <module>
    from .base import TrainBaseAPI
  File "/User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages/hack12306/base.py", line 23, in <module>
    from .utils import urlencode, tomorrow, time_cst_format
  File "/User/home/.local/share/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages/hack12306/utils.py", line 10, in <module>
    import six
ImportError: No module named six

执行pip install 12306-booking -U:

(12306booking-8aqe4YCo) [~/codelife/12306booking]$ pip install 12306-booking -U
Requirement already up-to-date: 12306-booking in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (0.1.8)
Requirement already satisfied, skipping upgrade: hack12306>=0.1.11 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from 12306-booking) (0.1.11)
Requirement already satisfied, skipping upgrade: Pillow>=5.4.1 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from 12306-booking) (5.4.1)
Requirement already satisfied, skipping upgrade: click==7.0 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from 12306-booking) (7.0)
Requirement already satisfied, skipping upgrade: requests>=2.12.4 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from hack12306>=0.1.11->12306-booking) (2.21.0)
Requirement already satisfied, skipping upgrade: BeautifulSoup>=3.2.1 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from hack12306>=0.1.11->12306-booking) (3.2.1)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from requests>=2.12.4->hack12306>=0.1.11->12306-booking) (1.24.1)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from requests>=2.12.4->hack12306>=0.1.11->12306-booking) (2018.11.29)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from requests>=2.12.4->hack12306>=0.1.11->12306-booking) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in ~/xxx/virtualenvs/12306booking-8aqe4YCo/lib/python2.7/site-packages (from requests>=2.12.4->hack12306>=0.1.11->12306-booking) (2.8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.