import requests from bs4 import BeautifulSoup # URL of the page to scrape url = 'https://www.aeaweb.org/issues/785' # Send a GET request to the page response = requests.get(url) response.raise_for_status() # Check that the request was successful # Parse the page content with BeautifulSoup soup = BeautifulSoup(response.content, 'html.parser') # Find all article links article_links = [] for a_tag in soup.find_all('a', href=True): href = a_tag['href'] if href.startswith('/articles?id='): full_url = 'https://www.aeaweb.org' + href article_links.append(full_url) # Print the article links for link in article_links: print(link)