ParallelSoup
A library that utilizes BeautifulSoup to provide multi threaded scrapping, reducing the total time involved in the scrapping process
Aim
The library should implement the following affectively: (this list can be extended in future):
- Parallelization (I mean duh, you didn't see the repo name or what...)
- Should consider the fact that user already has serial BeautifulSoup code
- Adding to above point: should be easier for user too just use our library
- All parts of the library should be documented
- All parts of the library should have unit tests written for verification of their functionality
- Showcase written examples for different sorts of scrapping
Example
A small example of scraping imdb with ParallelSoup with goodness of 8 threads
from parallelsoup import ParallelSoup
urls = []
for i in range(0, 10):
urls.append("https://www.imdb.com/search/title/?countries=in&adult=include&start=" + str(50*i + 1) + "&ref_=adv_nxt")
def extractor(soup):
data = []
for item in soup.findAll('div', attrs={'class':'lister-item mode-advanced'}):
title = item.find('div', attrs={'class':'lister-item-content'}).h3.a
if title != None:
data.append(title.text)
return data
ps = ParallelSoup(8, urls, extractor)
ps.start()
dataParallel = ps.get()
print(dataParallel)
Issues
This library is still in development, for reporting any bugs or suggestions please open a new issue here
Metadata
Release files for parallelsoup 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| parallelsoup-2.0.0.tar.gz | 3.6 kB | Without provenance | Details for parallelsoup-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| parallelsoup-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for parallelsoup-2.0.0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / parallelsoup-2.0.0.tar.gz
| Download URL | parallelsoup-2.0.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c080fa184eea73d6552e6cee1cf8b262a4a65de1bc72e02a75f0e789ed2ddfc
|
|
BLAKE2b-256 checksum How to use checksums |
b019746386f3ee49e8c0cf9c14ec9a4cee504488ec5d0f428b59595568ff7069
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / parallelsoup-2.0.0-py3-none-any.whl
| Download URL | parallelsoup-2.0.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8afc786b6ff5447f214903b0f66b17f451edad20ef22b544dbccdf080e6c38c
|
|
BLAKE2b-256 checksum How to use checksums |
709d1b565e5e72e25f19ecc3f21a4e77760115d96b1c4b6a5b3ef8593358a238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for parallelsoup 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.