Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 7th, 2018 54 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. import requests
  2. import html2text
  3. import bs4
  4. s = requests.get ('https://sinoptik.com.ru/weather-kazan')
  5. main=bs4.BeautifulSoup(s.text, "html.parser")
  6.  
  7. print ('---\nПогода на: ')
  8. x = main.select('.bd1 .day-link')
  9. x1 = x[0].getText().lower()
  10. print (x1)
  11. print ('---')
  12.  
  13. print ()
  14.  
  15. print ("Погода ночью:")
  16. p1 = main.select('.temperature .p1')
  17. pnight1 = p1[0].getText()
  18. p2 = main.select('.temperature .p2')
  19. pnight2 = p2[0].getText()
  20. print ('00:00 | ',pnight1)
  21. print ('03:00 | ',pnight2)
  22.  
  23. print ()
  24.  
  25. print ("Погода утром:")
  26. p3 = main.select('.temperature .p3')
  27. pmorning1 = p3[0].getText()
  28. p4 = main.select('.temperature .p4')
  29. pmorning2 = p4[0].getText()
  30. print ('06:00 | ',pmorning1)
  31. print ('09:00 | ',pmorning2)
  32.  
  33. print ()
  34.  
  35. print ("Погода днем:")
  36. p5 = main.select('.temperature .p5')
  37. pday1 = p5[0].getText()
  38. p6 = main.select('.temperature .p6')
  39. pday2 = p6[0].getText()
  40. print ('12:00 | ',pday1)
  41. print ('15:00 | ',pday2)
  42.  
  43. print ()
  44.  
  45. print ("Погода вечер:")
  46. p7 = main.select('.temperature .p7')
  47. pevening1 = p7[0].getText()
  48. p8 = main.select('.temperature .p8')
  49. pevening2 = p8[0].getText()
  50. print ('18:00 | ',pevening1)
  51. print ('21:00 | ',pevening2)
  52.  
  53. print ()
  54.  
  55. p = main.select('.rSide .description')
  56. desc = p[0].getText()
  57. print (desc)
  58.  
  59. a = input()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top