wesearch 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wesearch/__init__.py +25 -0
- wesearch/chrome/__init__.py +1 -0
- wesearch/chrome/chrome_android_useragents.txt +4439 -0
- wesearch/chrome/chrome_desktop_useragents.txt +39 -0
- wesearch/chrome/headers.py +255 -0
- wesearch/chrome/useragents.py +134 -0
- wesearch/errors.py +134 -0
- wesearch/fetch/__init__.py +31 -0
- wesearch/fetch/challenge.py +146 -0
- wesearch/fetch/common.py +228 -0
- wesearch/fetch/curl.py +449 -0
- wesearch/fetch/fetch.py +1040 -0
- wesearch/fetch/stdlib.py +228 -0
- wesearch/fetch/test_helpers.py +67 -0
- wesearch/fetch/transport_routing.py +140 -0
- wesearch/fetch/zendriver.py +635 -0
- wesearch/lib/__init__.py +1 -0
- wesearch/lib/custom_json.py +742 -0
- wesearch/lib/testing/__init__.py +3 -0
- wesearch/lib/testing/main.py +39 -0
- wesearch/lib/userdirs.py +178 -0
- wesearch/paper/__init__.py +36 -0
- wesearch/paper/authors.py +104 -0
- wesearch/paper/custom_types.py +147 -0
- wesearch/paper/details.py +192 -0
- wesearch/paper/errors.py +90 -0
- wesearch/paper/fetch.py +208 -0
- wesearch/paper/fuse.py +78 -0
- wesearch/paper/ids.py +150 -0
- wesearch/paper/paginate.py +147 -0
- wesearch/paper/providers/__init__.py +9 -0
- wesearch/paper/providers/openalex.py +444 -0
- wesearch/paper/providers/s2.py +545 -0
- wesearch/paper/providers/searxng.py +106 -0
- wesearch/paper/search.py +213 -0
- wesearch/profile.py +294 -0
- wesearch/ratelimit.py +747 -0
- wesearch/scrape.py +53 -0
- wesearch/search.py +1000 -0
- wesearch-0.1.0.dist-info/METADATA +122 -0
- wesearch-0.1.0.dist-info/RECORD +43 -0
- wesearch-0.1.0.dist-info/WHEEL +4 -0
- wesearch-0.1.0.dist-info/licenses/LICENSE +201 -0
wesearch/__init__.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Web utilities: HTTP fetch, HTML scraping, and search backends.
|
|
2
|
+
|
|
3
|
+
Import each name from the submodule that defines it (this ``__init__``
|
|
4
|
+
re-exports nothing, matching :mod:`wesearch.paper`):
|
|
5
|
+
|
|
6
|
+
- :mod:`.fetch` -- ``fetch`` (the sole HTTP egress; transparently backed by a
|
|
7
|
+
persistent per-``(egress_ip, domain)`` cookie + User-Agent profile).
|
|
8
|
+
- :mod:`.profile` -- ``Profile``, ``ProfileStore`` (the cross-process jar the
|
|
9
|
+
``fetch`` orchestrator drives).
|
|
10
|
+
- :mod:`.errors` -- ``FetchError``, ``BotDetectionError`` + its subclasses.
|
|
11
|
+
- :mod:`.scrape` -- ``get_element_content``.
|
|
12
|
+
- :mod:`.search` -- ``search`` + ``SearchResult`` and the result types.
|
|
13
|
+
- :mod:`.fetch` also exposes ``egress_ip`` / ``last_known_egress_ip``
|
|
14
|
+
(public-egress-IP lookup, memoized) alongside ``fetch``.
|
|
15
|
+
- :mod:`.paper` -- scholarly-paper lookup subpackage.
|
|
16
|
+
|
|
17
|
+
Usage::
|
|
18
|
+
|
|
19
|
+
from wesearch.fetch import fetch
|
|
20
|
+
from wesearch.errors import FetchError, BotDetectionError
|
|
21
|
+
from wesearch.scrape import get_element_content
|
|
22
|
+
from wesearch.search import search, SearchResult
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from __future__ import annotations
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Chrome parity helpers: the headers a real Chrome sends, and its capture."""
|