Skip to content

Instantly share code, notes, and snippets.

@esemi
Created October 14, 2025 14:24
Show Gist options
  • Select an option

  • Save esemi/662314d0579cec5110f1c0922642824c to your computer and use it in GitHub Desktop.

Select an option

Save esemi/662314d0579cec5110f1c0922642824c to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
urls = (
'https://www.tehnomedia.rs/telefonija/mobilni-telefon/apple-iphone-17-256gb-mist-blue-mg6l4sx-a.html#data',
'yet-another-model-url', # fixme
)
for url in urls:
# scrapper
html = requests.get(url)
raw_html_content = html.text
# parser
soup = BeautifulSoup(raw_html_content)
title_element = soup.find(class_="product-title").find(name='h1').text
price_element = soup.find(class_="price").find(name='strong').text
print(title_element, price_element)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment