I'm a Beginner in Python, I just want to scrap all the read more links from amazon job page. for example, I want to scrap this page https://www.amazon.jobs/en/search?base_query=&loc_query=Greater+Seattle+Area%2C+WA%2C+United+States&latitude=&longitude=&loc_group_id=seattle-metro&invalid_location=false&country=&city=®ion=&county=
Below is the code I used.
#import the library used to query a website
import urllib2
#import the Beautiful soup functions to parse the data returned from the website
from bs4 import BeautifulSoup
#specify the url
url = "https://www.amazon.jobs/en/search?base_query=&loc_query=Greater+Seattle+Area%2C+WA%2C+United+States&latitude=&longitude=&loc_group_id=seattle-metro&invalid_location=false&country=&city=®ion=&county="
#Query the website and return the html to the variable 'page'
page = urllib2.urlopen(url)
#Parse the html in the 'page' variable, and store it in Beautiful Soup format
soup = BeautifulSoup(page, "lxml")
print soup.find_all("a")
Output:
[<a class="icon home" href="/en">Home</a>,
<a class="icon check-status" data-target="#icims-portal-selector" data-toggle="modal">Review application status</a>,
<a class="icon working" href="/en/working/working-amazon">Amazon culture & benefits</a>,
<a class="icon locations" href="/en/locations">Locations</a>,
<a class="icon teams" href="/en/business_categories">Teams</a>,
<a class="icon job-categories" href="/en/job_categories">Job categories</a>,
<a class="icon help" href="/en/faqs">Help</a>,
<a class="icon language" data-animate="false" data-target="#locale-options" data-toggle="collapse" href="#locale-options" id="current-locale">English</a>,
...
<a href="/en/privacy/us">Privacy and Data</a>,
<a href="/en/impressum">Impressum</a>]
I am getting links to only static elements in the page i.e which are constant for any query but I need the links to 4896 jobs. Can anyone guide me where I am doing wrong?