A small package that contains commonly used codes while scraping
Project description
Scrap Utils
This is small package that contains some code regularly repeated when scraping.
To install
pip install scrap-utils
To import in your program
import scrap_utils
It has the following functions:
load_json(filepath, encoding=None, errors=None, parse_float=None,
parse_int=None, parse_constant=None)
dump_json(data, filepath, encoding=None, errors=None, indent=4, skipkeys=False,
ensure_ascii=False, separators=None, sort_keys=False)
to_csv(dataset, filepath, mode="a", encoding=None, errors=None, newline='',
header=True, dialect='excel', **fmtparams)
requests_get(url, trials=0, sleep_time=30, max_try=math.inf, **requests_kwargs)
requests_post(url, trials=0, sleep_time=30, max_try=math.inf, **requests_kwargs)
To-do list I'm considering:
- remove print statements
- add unittest
- soup_get()
- driver_get()
- start_firefox()
- read_csv()
Feel free to add your contribution here
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
scrap-utils-0.0.2rc1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for scrap_utils-0.0.2rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce8e2fa8bed570abfadefbed6c5c87e5de16c61996ded869def03179c8726d9b |
|
MD5 | 1250ece72da11a5b3dcaf054fa3e2edb |
|
BLAKE2b-256 | 5adff05efb5198c0b0a594953f18d2da07bbcab395f579946f76d3e7e9061f81 |