Web Scraping from a Website with a Static URL
<p>So I am trying to extract postal code information from the <a href="https://www.canadapost.ca/cpo/mc/personal/postalcode/fpc.jsf?LOCALE=en" rel="nofollow">Canada Post Website</a>. The issue I am having here is the URL remains static regardless of what address you enter when trying to find a postal code. For instance, starting at the base page, if I input '1 MACLEAN ST' as my search query, and hit enter    </p>

<p><a href="https://i.stack.imgur.com/C0hmj.png" rel="nofollow"><img src="https://i.stack.imgur.com/C0hmj.png" alt="enter image description here"></a></p>

<p>You will notice the URL remains the same</p>

<p><a href="https://i.stack.imgur.com/Xo270.png" rel="nofollow"><img src="https://i.stack.imgur.com/Xo270.png" alt="enter image description here"></a></p>

<p>I have never web scraped from a website with a static URL before, and was wondering how I would go about doing this (eg. getting specific libraries for Python etc). I think at some point, I more than likely have to extract the postal code information (' A0J 1T0' in this case) through an html tag, as seen below. </p>

<p><a href="https://i.stack.imgur.com/dn56H.png" rel="nofollow"><img src="https://i.stack.imgur.com/dn56H.png" alt="enter image description here"></a></p>

<p>Since you need to perform actions prior to scraping, you need to use a headless browser like <a href="http://phantomjs.org" rel="nofollow">phantomjs</a>. It's a bit more challenging than basic scraping, but it will allow you to type in addresses programmatically and then scrape the resulting data of the page that is returned.</p>

python html url static web-scraping