Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3.  
  4. res = requests.get("https://www.hasznaltauto.hu").text
  5. soup = BeautifulSoup(res,'html')
  6. cars = [str(x.text) for x in soup.find(id="hirdetesszemelyautosearch-marka_id").find_all('option')][1:]
  7. print(cars)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement