파이썬(Python) 3.x에서는 mechanize 사용이 불가능합니다. 대책은?

  • jeeg
    (강철지그)
  • jeeg's Avatar 이 글의 작성자
  • Offline
  • Junior
  • Junior
더보기
11 Jul 2017 16:17 - 11 Jul 2017 16:21 #2353 작성자: jeeg
jeeg 님의 글: 파이썬(Python) 3.x에서는 mechanize 사용이 불가능합니다. 대책은?
mechanize 많이 사용하시죠.

$ pip3 install mechanize
Collecting mechanize
  Downloading mechanize-0.3.5.tar.gz (201kB)
    100% |????????????????????????????????| 204kB 1.1MB/s
    Complete output from command python setup.py egg_info:
    mechanize only works on python 2.x

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

하지만 mechanize는 파이썬 버전 3에서는 사용이 불가능합니다.

그럼 대책은요?

MechanicalSoup은 어때요?

$ pip3 install MechanicalSoup
Collecting MechanicalSoup
  Downloading MechanicalSoup-0.7.0-py2.py3-none-any.whl
Collecting six>=1.4 (from MechanicalSoup)
  Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.0 in /app/python361/lib/python3.6/site-packages (from MechanicalSoup)
Requirement already satisfied: beautifulsoup4 in /app/python361/lib/python3.6/site-packages (from MechanicalSoup)
Requirement already satisfied: idna<2.6,>=2.5 in /app/python361/lib/python3.6/site-packages (from requests>=2.0->MechanicalSoup)
Requirement already satisfied: urllib3<1.22,>=1.21.1 in /app/python361/lib/python3.6/site-packages (from requests>=2.0->MechanicalSoup)
Requirement already satisfied: certifi>=2017.4.17 in /app/python361/lib/python3.6/site-packages (from requests>=2.0->MechanicalSoup)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /app/python361/lib/python3.6/site-packages (from requests>=2.0->MechanicalSoup)
Installing collected packages: six, MechanicalSoup
Successfully installed MechanicalSoup-0.7.0 six-1.10.0
Time to create page: 0.174 seconds
Powered by Kunena Forum