Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3 #96

Open
hickford opened this issue May 15, 2014 · 4 comments
Open

Support Python 3 #96

hickford opened this issue May 15, 2014 · 4 comments

Comments

@hickford
Copy link

Found this library incredibly useful in the past, would be great now if mechanize supported Python 3.x . I tried

pip install mechanize

But this happened:

Downloading/unpacking mechanize
  Running setup.py (path:C:\Users\Matt\AppData\Local\Temp\pip_build_Matt\mechanize\setup.py) egg_info for package mechanize

Installing collected packages: mechanize
  Running setup.py install for mechanize
      File "C:\Python34\Lib\site-packages\mechanize\_beautifulsoup.py", line 267
        raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)
                            ^
    SyntaxError: invalid syntax

Apologies if this has been reported before, I searched but was surprised not to find an issue.


http://wwwsearch.sourceforge.net/mechanize/faq.html

Python 2.4, 2.5, 2.6, or 2.7. Python 3 is not yet supported.

@hickford
Copy link
Author

hickford commented Jun 2, 2014

Meanwhile, I'm making a library with similar functionality, built on Requests and BeautifulSoup. https://github.com/hickford/MechanicalSoup

@fantasyRqg
Copy link

@cswarren cswarren mentioned this issue Apr 13, 2015
@AyushyaChitransh
Copy link

@fantasyRqg I was trying to find a fix for the problem and tried looking at the link you referred to but was 404'd. Can you please provide the content that was there some time ago.

@hugovk
Copy link

hugovk commented Apr 1, 2017

I see this library has moved to a new home at https://github.com/python-mechanize/mechanize but it's still Python 2 only. It would be a good idea to open an issue there.

In the meantime, we've had good results[1] replacing mechanize with @hickford's MechanicalSoup, thanks for that!

[1] https://github.com/unitedstates/images/blob/gh-pages/scripts/gpo_member_photos.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants