Skip to main content

a simple http-server mockup to test web crawler.

Project description

PEP8

HTTPserver-mock

a simple http-server mockup to test web crawler.

Installation

Run the folowing to install:

pip install HTTPserver-mock

Usage

from src.HTTPserver_mock import HTTPserver_mock
import noizze_crawler as nc


@HTTPserver_mock()
def test_crawler():
    (title, desc, image_url, html) = nc.crawler('http://localhost:8000/index.html')
    print('title:', title)
    print('desc:', desc)
    print('image_url:', image_url)
    print('html:', html[:1000])


if __name__ == '__main__':
    test_crawler()
$ python test.py
127.0.0.1 - - [07/Nov/2019 13:34:55] "GET /index.html HTTP/1.1" 200 -
1573101292.684394 httpserver_mock started
<h2>nope</h2>
1573101296.704611 httpserver_mock finished

ChangeLog

  • v2: PyPI published
  • v1: Test alpha

Project details


Release history Release notifications | RSS feed

This version

2

Download files

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

Source Distribution

HTTPserver-mock-2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

HTTPserver_mock-2-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file HTTPserver-mock-2.tar.gz.

File metadata

  • Download URL: HTTPserver-mock-2.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.4

File hashes

Hashes for HTTPserver-mock-2.tar.gz
Algorithm Hash digest
SHA256 1c8414df89e245ced0100ad32026db664cb23631a778935cb0f7a38730c39991
MD5 459c35c06f4f7a00b13f7ffa5ebcdd39
BLAKE2b-256 a469f8b22a8d0c7ce2951dfcbc2975baa002867ee8fc9bac5c460c69afe988f1

See more details on using hashes here.

File details

Details for the file HTTPserver_mock-2-py3-none-any.whl.

File metadata

  • Download URL: HTTPserver_mock-2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.4

File hashes

Hashes for HTTPserver_mock-2-py3-none-any.whl
Algorithm Hash digest
SHA256 0152dc9748f45b842eebb6070b4ce548346cfa71e7c79a6a13b766e48dc3a592
MD5 b2f086756fcebcf9380ef8c94d4d1dc5
BLAKE2b-256 90274afac4d0af8d6a64f690d07e55eecabe537fc28bbc0252d7b42fe76ee135

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