input: Write a function to scrape photos and captions from a given website. If the image has a caption, it should be printed along with the photo URL. If the image does not have a caption, it should print "No caption".
  def scrape_photos_and_captions(url):
      req = requests.get(url)
      html = req.text
      soup = BeautifulSoup(html, 'lxml')
      image_divs = soup.find_all('div', {'class': 'image-gallery__image'})
      
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          print('Photo: ', src)
          if caption:
              print('Caption: ', caption.text)
          else:
              print('No caption')
          print('\n')
  
  # Test cases
  scrape_photos_and_captions('https://example.com/webpage1')  # Expected output: Prints 'Photo: ' followed by image source URL and 'Caption: ' followed by the caption text if available, else 'No caption'
  scrape_photos_and_captions('https://example.com/webpage2')  # Expected output: Similar to above, prints details for all images in the webpage
output: def scrape_photos_and_captions(url):
      req = requests.get(url)
      html = req.text
      soup = BeautifulSoup(html, 'lxml')
      image_divs = soup.find_all('div', {'class': 'image-gallery__image'})
      
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          print('Photo: ', src)
          if caption:
              print('Caption: ', caption.text)
          else:
              print('No caption')
          print('\n')