Skip to content

Commit 4ce8755

Browse files
committed
feat: moved tiny_web_crawller to datacrawl
fixed tests to pass without network connection
1 parent ffccc55 commit 4ce8755

21 files changed

Lines changed: 125 additions & 69 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ A simple and efficient web crawler for Python.
2424
Install using pip:
2525

2626
```sh
27-
pip install tiny-web-crawler
27+
pip install datacrawl
2828
```
2929

3030
## Usage
3131

3232
```python
33-
from tiny_web_crawler import Spider
34-
from tiny_web_crawler import SpiderSettings
33+
from datacrawl import Spider
34+
from datacrawl import SpiderSettings
3535

3636
settings = SpiderSettings(
3737
root_url = 'http://github.com',

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[tool.poetry]
2-
name = "tiny-web-crawler"
3-
version = "0.5.0"
2+
name = "datacrawl"
3+
version = "0.6.0"
44
description = "A simple and efficient web crawler in Python."
55
authors = ["Indrajith Indraprastham <indr4jith@gmail.com>"]
66
license = "GPL-3.0-or-later"
77
readme = "README.md"
8-
homepage = "http://github.com/indrajithi/tiny-web-crawler"
9-
repository = "http://github.com/indrajithi/tiny-web-crawler"
10-
documentation = "http://github.com/indrajithi/tiny-web-crawler"
8+
homepage = "http://github.com/DataCrawl-AI/datacrawl"
9+
repository = "http://github.com/DataCrawl-AI/datacrawl"
10+
documentation = "http://github.com/DataCrawl-AI/datacrawl"
1111
packages = [
12-
{ include = "tiny_web_crawler", from = "src" }
12+
{ include = "datacrawl", from = "src" }
1313
]
1414

1515
[tool.poetry.scripts]

src/datacrawl/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from datacrawl.core.spider import Spider
2+
from datacrawl.core.spider_settings import SpiderSettings
3+
4+
__all__ = ["Spider", "SpiderSettings"]
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
import requests
1414

15-
from tiny_web_crawler.core.spider_settings import SpiderSettings
16-
from tiny_web_crawler.logger import get_logger, set_logging_level
17-
from tiny_web_crawler.networking.fetcher import fetch_url
18-
from tiny_web_crawler.networking.formatter import format_url
19-
from tiny_web_crawler.networking.robots_txt import (
15+
from datacrawl.core.spider_settings import SpiderSettings
16+
from datacrawl.logger import get_logger, set_logging_level
17+
from datacrawl.networking.fetcher import fetch_url
18+
from datacrawl.networking.formatter import format_url
19+
from datacrawl.networking.robots_txt import (
2020
get_robots_txt_url,
2121
is_robots_txt_allowed,
2222
setup_robots_txt_parser,
2323
)
24-
from tiny_web_crawler.networking.validator import is_valid_url
24+
from datacrawl.networking.validator import is_valid_url
2525

2626
DEFAULT_SCHEME: str = "http://"
2727
logger = get_logger()
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/tiny_web_crawler/networking/fetcher.py renamed to src/datacrawl/networking/fetcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import requests
77
from bs4 import BeautifulSoup
88

9-
from tiny_web_crawler.logger import get_logger
9+
from datacrawl.logger import get_logger
1010

1111
TRANSIENT_ERRORS = [408, 502, 503, 504]
1212

0 commit comments

Comments
 (0)