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
build()
html()
resize(width:int, height:int)
screen(path:str)
select(name:str, value:str)
url()
visit(url:str)
wait(seconds:int)
webdriver()
where_inner_text(text)
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()
width()
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()
value(value:str = None)
gets the value of the element if there is no argument, but if an string was given, will set the input value
where_tag_name(name:str)
where_attribute(attribute:str, value:str)
Colaborators
If you are a collaborator, please consider do the next:
- Create your new functionality
- Create a test of your new functionality
- change the version of the package in setup.py
- execute the next command:
python3 setup.py sdist bdist_wheel - upload the package:
source venv/bin/active && twine upload dist/*<your-version>*
for developers
install twine: python3 -m pip instal twine
install setuptools: pip3 install setuptools
install setuptools: python3 setup.py sdist bdist_wheel
upload your changes: twine upload dist/*
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrappier-1.6.0.tar.gz.
File metadata
- Download URL: scrappier-1.6.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bafac881022d9003be140525f06e6afae28ba71b7fb9c8006c15cc8cd6387d69
|
|
| MD5 |
aa9221f65ce050ea3f3a8b5c80b0abbd
|
|
| BLAKE2b-256 |
b8c5df1b4bf9cdebb7d8fd9eeb18e5ddbb80f14bdb41cfa9624b197da46a842b
|
File details
Details for the file scrappier-1.6.0-py3-none-any.whl.
File metadata
- Download URL: scrappier-1.6.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd8154c7267fff46fd76f41adde300f9f50edfc6a0f36f85f53a4f61ff00ef0d
|
|
| MD5 |
84d96a59cb3bc18660129dec63d90bcc
|
|
| BLAKE2b-256 |
2aec23588e090e111627d2e62c5f9363b3dcde98d894f89a42b0d75c89d05786
|