fork download
  1. import requests
  2. import bs4
  3.  
  4. link = 'http://k...content-available-to-author-only...a.kz/prodazha/kvartiry'
  5.  
  6. city = input('City? ')
  7. link = link+city
  8.  
  9. room = input('Room? ')
  10. link = link + '?das[live.rooms]=' + room
  11.  
  12. price_from = input('Price room? ')
  13. link = link + '&das[price][from]=' + price_from
  14.  
  15.  
  16. price_to = input('Price to? ')
  17. link = link + '&das[price][to]=' + price_to
  18.  
  19. data = requests.get(link)
  20. soup = bs4.BeautifulSoup(data.text, 'html parser')
  21. tags = soup.findAll('a')
  22. for tag in tags:
  23. href = tag.get('href')
  24. if href.startswith('/a/show'):
  25. print('https://k...content-available-to-author-only...a.kz' + href)
  26.  
Runtime error #stdin #stdout #stderr 0.01s 7120KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 1, in <module>
ImportError: No module named requests