I would like to use Python mechanize to automatically collect information on tour products from the JTB site.
For example
If you jump to the link below from your PC browser,
http://ovspkg.jtb.co.jp/pkg/toursearch/search_result.aspx?deptplacecd=HND&destareacd=HWI
Haneda departure, destination Hawaii tour products
After it says "Loading", it will be displayed on the browser,
If you scrape using the code below,
br = mechanize.Browser()$ br.addheaders = [('User-agent', 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0 like Mac OS X; ja-jp) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5A345 Safari/525.20')] br.open('http://ovspkg.jtb.co.jp/pkg/toursearch/search_result.aspx?deptplacecd=HND&destareacd=HWI') print br.response().resd()
You can't get the HTML in the loaded state,
I can't get the link after loading.
Somehow, I want to get the HTML after loading,
Does anyone know a good way?
Thank you.
Recommended Posts