[Solved] I have a question for those who are familiar with Python mechanize.

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

[Solved] I have a question for those who are familiar with Python mechanize.
For those who are new to programming but have decided to analyze data with Python
Environment construction procedure for those who are not familiar with the python version control system
I have a question! (Python, django) Easy
For those who want to write Python with vim
For those who should have installed janome properly with Python but get an error
For those who are having trouble drawing graphs in python
ABC's A problem analysis for the past 15 times to send to those who are new to Python
For those who are in trouble because NFC is read infinitely when reading NFC with Python
Machine learning A story about people who are not familiar with GBDT using GBDT in Python
I have a question about whitespace
I made a fortune with Python.
I made a daemon with Python
I made a lot of files for RDP connection with Python
I tried to teach Python to those who have no programming experience
A memo for those who want quick socket communication with netcat
A memo for those who use Python in Visual Studio (me)
A modern environment building procedure for those who want to get started with Python right away
[Short sentence] easygui for those who want to use a simple GUI with Python very easily
I made a character counter with Python
I drew a heatmap with seaborn [Python]
I tried a functional language with Python
What I did with a Python array
I made a Hex map with Python
I made a roguelike game with Python
I made a simple blackjack with Python
I made a configuration file with Python
I made a neuron simulator with Python
Getting Started with Processing and p5.js (for those who have done other languages) 02
Introduced Mac (M1) TensorFlow (recommended for those who have installed python by themselves)
Tips for those who are wondering how to use is and == in Python
Getting Started with Processing and p5.js (for those who have done other languages) 01
For those who want to learn Excel VBA and get started with Python
I made a familiar function that can be used in statistics with Python
5 Reasons Processing is Useful for Those Who Want to Get Started with Python
I made a python dictionary file for Neocomplete
I made a competitive programming glossary with Python
I made a weather forecast bot-like with Python.
Dart grammar for those who only know Python
I made a GUI application with Python + PyQt5
Get a ticket for a theme park with python
Create a LINE BOT with Minette for Python
For those who have done pip uninstall setuptools
I made a Twitter fujoshi blocker with Python ①
I want to make a game with Python
Procedure for creating a LineBot made with Python
[Python] I made a Youtube Downloader with Tkinter.
Commands for creating a python3 environment with virtualenv
I want to write to a file with Python
I made a bin picking game with Python
I made a Mattermost bot with Python (+ Flask)
[Python] I want to use only index when looping a list with a for statement
[For those who have mastered other programming languages] 10 points to catch up on Python points
I want to tell people who want to import from a higher directory with Python direnv
❤️ Bloggers ❤️ "Beloved BI" ❤️ Let's get started ❤️ (For those who can make charts with Python)
For Debian users who are having trouble with a bug in the Linux kernel 5.10
For those who are in trouble with an error when pip install xg boost
Environment construction for those who want to study python easily with VS Code (for Mac)
I made a Twitter BOT with GAE (python) (with a reference)
I learned Python with a beautiful girl at Paiza # 01
I made a Christmas tree lighting game with Python