Skip to main content

A Python package to scrape and clone websites.

Project description

Scraply

Scraply is a Python package designed to scrape websites, extract all internal URLs, and clone pages by saving them as HTML files. You can use it through the command line interface or import it as a library in your Python scripts.

Features

  • Scrape all internal URLs from a given website.
  • Clone and save HTML content from all URLs or a specific URL.

Installation

Using pip

To install Scraply, use the following command:

pip install scraply

Usage

Scraping All URLs from a Website

import time
from scraply import scrape_urls

# URL to scrape
url = 'https://example.com'

# Scraping all URLs from the website
start_time = time.time()
urls = scrape_urls(url)

# Print the scraped URLs
for url in urls:
    print(url)

end_time = time.time()
print(f"Total scraping time: {end_time - start_time:.2f} seconds")

Cloning All Pages

from scraply import clone_page

# Clone each URL from a list
urls = ['https://example.com/privacy', 'https://example.com/about']

for url in urls:
    clone_page(url)

Cloning a Single Specific Page

from scraply import clone_page

# Clone a single page
clone_page('https://example.com/privacy')

License

This project is licensed under the MIT License.

Contributing

Feel free to fork, contribute, or open issues on the GitHub repository.

Author

Developed by Fidal.
Email: mrfidal@proton.me GitHub: mr-fidal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scraply-1.0.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scraply-1.0.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file scraply-1.0.2.tar.gz.

File metadata

  • Download URL: scraply-1.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for scraply-1.0.2.tar.gz
Algorithm Hash digest
SHA256 348e5afd154b02e01f3ee324d021dce196ead132a630da64bcb89d10679e4788
MD5 2ae7f4441f844970400f4403bf60f868
BLAKE2b-256 bfd3a24e2a5733e0c355f92a31c418f11c703346f8473da8e9fbeda6c7196788

See more details on using hashes here.

File details

Details for the file scraply-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: scraply-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for scraply-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f2ef864376c4ffd8f57bda02674122652f6e79985a9f21c2d30044c3db09f3a0
MD5 35bdf0a75981dceea64ede1c2375137a
BLAKE2b-256 0945d77ffbc6c542eeb8f063dec1f990d176f48386a24efd5becb9ae1359d73c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page