Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CODE OF THE FIRST PAGE
- -----------------------------------------------------------------------------
- # url of page on usage
- my_url = 'URL(DELETED)'
- # opening up connection, grabbing the page
- uClient = uReq(my_url)
- page_html = uClient.read()
- uClient.close()
- # html parsing
- page_soup = soup(page_html, "html.parser")
- # grabs each product on the current url
- containers = page_soup.findAll("div", {"class": "item__info-container"})
- # makes a variable with the quantity of apartments on the url
- quantity_len = range(len(containers))
- def print_result():
- for container in quantity_len:
- # contiene la dirección del departamento
- address_container = page_soup.findAll("span", {"class": "main-title"})
- address = address_container[container].text
- print("address: " + address)
- THIS IS WHERE THE NEXT URL IS LOCATED:
- ----------------------------------------------------------------------------------------
- next_page_container = page_soup.find("a", {"class": "andes-pagination__link prefetch"})
- next_page = next_page_container["href"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement