Advertisement
FutureDreams

UZEX parser

May 13th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. from requests_html import HTMLSession
  2. from bs4 import BeautifulSoup
  3.  
  4. session = HTMLSession()
  5. resp = session.get("http://exarid.uzex.uz")
  6. parser = BeautifulSoup(resp.text, 'html.parser')
  7. rows = parser.find_all('tr')
  8. for i in rows:
  9.     cols = i.find_all('td')
  10.     if cols:
  11.         print('\t'.join([(k.text.replace('\n', '').replace('\r', '')) for k in cols]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement