If you run the script below, you will not get a response.
import mechanismize
b=mechanize.Browser();
b.set_handle_robots (False);
h=b.open('http://stocks.finance.yahoo.co.jp/stocks/detail/?code=2726');
Other url (such as http://www.google.com
) will respond properly.
Why?
This is stock price information, so I think it is caused by regular refresh.
Specify set_handle_refresh(False)
to disable the Refresh header.
Verified a response.
import mechanismize
b=mechanize.Browser()
b. set_handle_robots (False)
b. set_handle_refresh (False)
h=b.open('http://stocks.finance.yahoo.co.jp/stocks/detail/?code=2726')
In detail, python does not require ;
.
Even if there is one, it doesn't make an error...
579 Understanding How to Configure Google API Key
577 Who developed the "avformat-59.dll" that comes with FFmpeg?
624 Uncaught (inpromise) Error on Electron: An object could not be cloned
585 PHP ssh2_scp_send fails to send files as intended
615 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.