I'm learning how to webscrape with python and I'm wondering if it's possible to grab two pages with requests.get()
so that I don't have to make two separate calls and variables. For example:
r1 = requests.get("page1")
r2 = requests.get("page2")
pg1 = BeautifulSoup(r1.content, "html.parser")
pg2 = BeautifulSoup(r2.content, "html.parser")
As you can see there's repeated code. Any way around this? Thanks!