Scrapper for chrome
Project description
Scrappier
Scrappier is a web scrapper which uses chrome in a headless mode. This library provides an easy-to-read syntaxis to navigate through the different elements and perform actions.
Requirements
- python 3.8
- chrome driver installed in /usr/bin/chromedriver
Instalation
pip install scrappier
Basic usage
from scrappier import Browser
browser = Browser()
cards = browser.where_class("card").get()
for card in cards:
span = card.where_tag_name("span").first()
print(span.text())
Available methods for browser
width()
where_inner_text(text)
build()
resize(width:int, height:int)
webdriver()
screen(path:str)
wait(seconds:int)
visit(url:str)
where_xpath(xpath:str)
where_id(id:str)
where_name(name:str)
where_contain_text(name:str)
where_class_name(name:str)
where_tag_name(name:str)
where_attribute()
Available methods for ElementFinder
until(seconds:int)
get()
first()
where_xpath(xpath:str, driver, element=None)
where_id(id:str, driver, element=None)
where_inner_text(text:str, driver, element=None)
where_contain_text(text, driver, element=None)
where_class_name(name:str, driver, element=None)
where_tag_name(name:str, driver, element=None)
next_sibling(name:str, driver, element)
Available methods for Element
attributes() -> list
enter()
type(text:str)
text()
html()
attribute(name:str)
click()
children()
next_sibling()
where_tag_name(name:str)
where_attribute(attribute:str, value:str)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scrappier-1.2.0.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for scrappier-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baeda7e15deb6b27e7b05ac8efe49013b9d05be1e53a9feacb198049338cdaed |
|
MD5 | 56c074b625efd0c77e59bf1e15143c66 |
|
BLAKE2b-256 | 9f81b8d95b9eee2bf8e4ccc11a067176c92ce0ef69c321686e897a1b62fda79d |