Answer the question
In order to leave comments, you need to log in
How to use MECHANIZE in a FLASK project?
Python 2.7.11, Windows 2008 R2
Inside a Flask project, I use Mechanize to get data from another site.
When testing, everything works, but as soon as I deploy to IIS, the record drops when loading an external site through Mechanize:
response = br.open(url)
Maybe IIS puts some kind of bans?
When tested (python app.py - localhost:5000) no problem
Received error:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Answer the question
In order to leave comments, you need to log in
Solved by calling requests.get('localhost:8000/script_mechanize.py')
where localhost:8000/script_mechanize.py script containing mechanize raised on CGI
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question