I have a glassdoor link that I'm trying to access through request.get()
https://www.glassdoor.com/Job/jobs.htm?sc.generalKeyword=%22teaching%22&sc.locationSeoString=new+york&locId=1132348&locT=C
I noticed that when I click on the next page a lo_IP{page_number}.htm is added. For example:
https://www.glassdoor.com/Job/jobs.htm?sc.generalKeyword=%22teaching%22&sc.locationSeoString=new+york&locId=1132348&lo_IP4.htm for page 4.
but when I go directly to that link (page 4 for example), it does not take me to page 4. Is there a way to go to the nth number of page?
pages= 2
for x in range(1, pages):
page_url = "https://www.glassdoor.com/Job/jobs.htm?sc.generalKeyword=%22teaching%22&sc.locationSeoString=new+york&locId=1132348&lo_IP{}.htm".format(x)
headers = {"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"}
page = requests.get(page_url, headers=headers)
soup = BeautifulSoup(page.content, 'html.parser')