Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import urllib.request
  2. from bs4 import BeautifulSoup as soup
  3.  
  4. my_url = 'https://souteze.fotbal.cz/turnaje/table/8b1b59e8-691f-43f9-88e7-d567f7ab74f5'
  5. # url stránky
  6.  
  7. hdr = {'Cookie': 'PHPSESSID=etsiaq1a31js5raliteugph880'}
  8. req = urllib.request.Request(my_url, headers=hdr)
  9. uClient = urllib.request.urlopen(req)
  10. # stáhne data ze stránky
  11.  
  12.  
  13. page_html = uClient.read()
  14. uClient.close()
  15.  
  16. page_soup = soup(page_html, "html.parser")
  17.  
  18.  
  19. tabulka = page_soup.findAll("table", {"class": "table"})
  20. # did not find anything
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement