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>You could write a wrapper using something like <a href="http://scraping.pro/selenium-ide-and-web-scraping/" rel="nofollow">Selenium</a> to interact with the page dynamically. </p>

<p>Alternatively, you may want to look into their developer API, which should allow you to provide an address and get back a code (as well as more advanced use cases like creating shipping labels).</p>

<p><a href="https://www.canadapost.ca/cpo/mc/business/productsservices/developers/services/fundamentals.jsf" rel="nofollow">https://www.canadapost.ca/cpo/mc/business/productsservices/developers/services/fundamentals.jsf</a></p>

python html url static web-scraping