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.
Files changed (43) hide show
  1. wesearch/__init__.py +25 -0
  2. wesearch/chrome/__init__.py +1 -0
  3. wesearch/chrome/chrome_android_useragents.txt +4439 -0
  4. wesearch/chrome/chrome_desktop_useragents.txt +39 -0
  5. wesearch/chrome/headers.py +255 -0
  6. wesearch/chrome/useragents.py +134 -0
  7. wesearch/errors.py +134 -0
  8. wesearch/fetch/__init__.py +31 -0
  9. wesearch/fetch/challenge.py +146 -0
  10. wesearch/fetch/common.py +228 -0
  11. wesearch/fetch/curl.py +449 -0
  12. wesearch/fetch/fetch.py +1040 -0
  13. wesearch/fetch/stdlib.py +228 -0
  14. wesearch/fetch/test_helpers.py +67 -0
  15. wesearch/fetch/transport_routing.py +140 -0
  16. wesearch/fetch/zendriver.py +635 -0
  17. wesearch/lib/__init__.py +1 -0
  18. wesearch/lib/custom_json.py +742 -0
  19. wesearch/lib/testing/__init__.py +3 -0
  20. wesearch/lib/testing/main.py +39 -0
  21. wesearch/lib/userdirs.py +178 -0
  22. wesearch/paper/__init__.py +36 -0
  23. wesearch/paper/authors.py +104 -0
  24. wesearch/paper/custom_types.py +147 -0
  25. wesearch/paper/details.py +192 -0
  26. wesearch/paper/errors.py +90 -0
  27. wesearch/paper/fetch.py +208 -0
  28. wesearch/paper/fuse.py +78 -0
  29. wesearch/paper/ids.py +150 -0
  30. wesearch/paper/paginate.py +147 -0
  31. wesearch/paper/providers/__init__.py +9 -0
  32. wesearch/paper/providers/openalex.py +444 -0
  33. wesearch/paper/providers/s2.py +545 -0
  34. wesearch/paper/providers/searxng.py +106 -0
  35. wesearch/paper/search.py +213 -0
  36. wesearch/profile.py +294 -0
  37. wesearch/ratelimit.py +747 -0
  38. wesearch/scrape.py +53 -0
  39. wesearch/search.py +1000 -0
  40. wesearch-0.1.0.dist-info/METADATA +122 -0
  41. wesearch-0.1.0.dist-info/RECORD +43 -0
  42. wesearch-0.1.0.dist-info/WHEEL +4 -0
  43. 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."""