jobstreaming 0.0.3__tar.gz → 0.0.4__tar.gz
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.
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/CHANGELOG.md +14 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/PKG-INFO +8 -2
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/README.md +7 -1
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/context.py +6 -1
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/linkedin/__init__.py +26 -14
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/pyproject.toml +4 -4
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/CONTRIBUTING.md +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/LICENSE +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/SECURITY.md +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/api.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/batch.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/bayt/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/bdjobs/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/bdjobs/constant.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/bdjobs/util.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/checkpoint.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/collector.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/events.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/exception.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/glassdoor/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/glassdoor/constant.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/glassdoor/util.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/google/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/google/constant.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/google/util.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/indeed/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/indeed/constant.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/indeed/util.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/linkedin/constant.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/linkedin/util.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/model.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/naukri/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/naukri/constant.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/naukri/util.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/outcome.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/protocols.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/py.typed +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/registry.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/result.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/runtime.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/salary.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/testing.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/util.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/ziprecruiter/__init__.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/ziprecruiter/constant.py +0 -0
- {jobstreaming-0.0.3 → jobstreaming-0.0.4}/jobstreaming/ziprecruiter/util.py +0 -0
|
@@ -4,6 +4,19 @@ All notable changes to JobStreaming are documented here. The project follows sem
|
|
|
4
4
|
versioning where practical during its `0.0.x` alpha series; adapter compatibility can
|
|
5
5
|
still change when upstream boards drift.
|
|
6
6
|
|
|
7
|
+
## [0.0.4] - 2026-08-28
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- LinkedIn continuation requests use a measured randomized one-to-two-second delay
|
|
12
|
+
and the provider's observed ten-card page size for offset calculations.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- LinkedIn stops after a partial terminal page instead of waiting and issuing an
|
|
17
|
+
empty follow-up request, and skips detail enrichment for stable identities already
|
|
18
|
+
seen during the current or resumed search.
|
|
19
|
+
|
|
7
20
|
## [0.0.3] - 2026-08-09
|
|
8
21
|
|
|
9
22
|
### Added
|
|
@@ -93,5 +106,6 @@ still change when upstream boards drift.
|
|
|
93
106
|
contracts.
|
|
94
107
|
- Added Python 3.10 through 3.14 CI coverage and pinned release automation.
|
|
95
108
|
|
|
109
|
+
[0.0.4]: https://github.com/ebarti/jobstreaming/compare/v0.0.3...v0.0.4
|
|
96
110
|
[0.0.3]: https://github.com/ebarti/jobstreaming/compare/v0.0.2...v0.0.3
|
|
97
111
|
[0.0.2]: https://github.com/ebarti/jobstreaming/releases/tag/v0.0.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jobstreaming
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: Stream normalized jobs from multiple boards with typed events and durable checkpoints
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -496,7 +496,7 @@ except StreamCancelledError:
|
|
|
496
496
|
| Site | Restart boundary | Notes |
|
|
497
497
|
|---|---|---|
|
|
498
498
|
| Indeed | cursor/page | Requires `JOBSTREAMING_INDEED_API_KEY`. `hours_old`, `easy_apply`, and `job_type`/`is_remote` are mutually exclusive in the upstream API. |
|
|
499
|
-
| LinkedIn | result offset/page | Full descriptions require `linkedin_fetch_description=True` and add one request per job. Aggressive rate limiting is common. |
|
|
499
|
+
| LinkedIn | result offset/page | Continuation pages use a randomized 1–2 second gap. Full descriptions require `linkedin_fetch_description=True` and add one request per job. Aggressive rate limiting is common. |
|
|
500
500
|
| ZipRecruiter | continuation token | Requires `JOBSTREAMING_ZIPRECRUITER_AUTHORIZATION`. US and Canada are the primary supported markets. |
|
|
501
501
|
| Glassdoor | page/cursor | Uses live CSRF discovery or explicitly configured fallback. A location is required unless `is_remote=True`. Availability depends on `country_indeed`. |
|
|
502
502
|
| Google Jobs | cursor | `google_search_term` can override the generated query. The upstream response format is opaque and fragile. |
|
|
@@ -610,6 +610,12 @@ with stream_search(
|
|
|
610
610
|
...
|
|
611
611
|
```
|
|
612
612
|
|
|
613
|
+
When an adapter must make an expensive detail request after discovering a stable
|
|
614
|
+
provider identity, call `context.already_seen_identity(identity)` first. The identity
|
|
615
|
+
must match the value the resulting `JobPost` will use as `id` (or `job_url` when no ID
|
|
616
|
+
is available). This avoids repeating enrichment for acknowledged jobs when a page is
|
|
617
|
+
replayed while preserving at-least-once delivery for unacknowledged jobs.
|
|
618
|
+
|
|
613
619
|
Increment `cursor_schema_version` whenever a deployed adapter can no longer interpret
|
|
614
620
|
cursor state written by its previous implementation. Custom identifiers are validated,
|
|
615
621
|
serialized as strings in requests/events/checkpoints, and must not collide with a
|
|
@@ -465,7 +465,7 @@ except StreamCancelledError:
|
|
|
465
465
|
| Site | Restart boundary | Notes |
|
|
466
466
|
|---|---|---|
|
|
467
467
|
| Indeed | cursor/page | Requires `JOBSTREAMING_INDEED_API_KEY`. `hours_old`, `easy_apply`, and `job_type`/`is_remote` are mutually exclusive in the upstream API. |
|
|
468
|
-
| LinkedIn | result offset/page | Full descriptions require `linkedin_fetch_description=True` and add one request per job. Aggressive rate limiting is common. |
|
|
468
|
+
| LinkedIn | result offset/page | Continuation pages use a randomized 1–2 second gap. Full descriptions require `linkedin_fetch_description=True` and add one request per job. Aggressive rate limiting is common. |
|
|
469
469
|
| ZipRecruiter | continuation token | Requires `JOBSTREAMING_ZIPRECRUITER_AUTHORIZATION`. US and Canada are the primary supported markets. |
|
|
470
470
|
| Glassdoor | page/cursor | Uses live CSRF discovery or explicitly configured fallback. A location is required unless `is_remote=True`. Availability depends on `country_indeed`. |
|
|
471
471
|
| Google Jobs | cursor | `google_search_term` can override the generated query. The upstream response format is opaque and fragile. |
|
|
@@ -579,6 +579,12 @@ with stream_search(
|
|
|
579
579
|
...
|
|
580
580
|
```
|
|
581
581
|
|
|
582
|
+
When an adapter must make an expensive detail request after discovering a stable
|
|
583
|
+
provider identity, call `context.already_seen_identity(identity)` first. The identity
|
|
584
|
+
must match the value the resulting `JobPost` will use as `id` (or `job_url` when no ID
|
|
585
|
+
is available). This avoids repeating enrichment for acknowledged jobs when a page is
|
|
586
|
+
replayed while preserving at-least-once delivery for unacknowledged jobs.
|
|
587
|
+
|
|
582
588
|
Increment `cursor_schema_version` whenever a deployed adapter can no longer interpret
|
|
583
589
|
cursor state written by its previous implementation. Custom identifiers are validated,
|
|
584
590
|
serialized as strings in requests/events/checkpoints, and must not collide with a
|
|
@@ -265,7 +265,12 @@ class ScrapeContext:
|
|
|
265
265
|
raise StreamCancelledError("Search stream was cancelled")
|
|
266
266
|
|
|
267
267
|
def already_seen(self, job: JobPost) -> bool:
|
|
268
|
-
|
|
268
|
+
return self.already_seen_identity(job.id or job.job_url)
|
|
269
|
+
|
|
270
|
+
def already_seen_identity(self, identity: str) -> bool:
|
|
271
|
+
"""Check a provider identity before constructing or enriching a job."""
|
|
272
|
+
|
|
273
|
+
key = stable_job_key(self.site.value, identity)
|
|
269
274
|
with self._lock:
|
|
270
275
|
return key in self._seen
|
|
271
276
|
|
|
@@ -52,9 +52,11 @@ log = create_logger("LinkedIn")
|
|
|
52
52
|
|
|
53
53
|
class LinkedIn(Scraper):
|
|
54
54
|
base_url = "https://www.linkedin.com"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
# Keep continuation requests jittered while avoiding a fixed five-second
|
|
56
|
+
# average gap between otherwise sub-second result-page requests.
|
|
57
|
+
delay = 1
|
|
58
|
+
band_delay = 1
|
|
59
|
+
jobs_per_page = 10
|
|
58
60
|
capabilities = AdapterCapabilities(
|
|
59
61
|
filters=frozenset(
|
|
60
62
|
{
|
|
@@ -124,7 +126,12 @@ class LinkedIn(Scraper):
|
|
|
124
126
|
resume_state = context.resume_state
|
|
125
127
|
start = int(
|
|
126
128
|
resume_state.get(
|
|
127
|
-
"start",
|
|
129
|
+
"start",
|
|
130
|
+
(
|
|
131
|
+
scraper_input.offset // self.jobs_per_page * self.jobs_per_page
|
|
132
|
+
if scraper_input.offset
|
|
133
|
+
else 0
|
|
134
|
+
),
|
|
128
135
|
)
|
|
129
136
|
)
|
|
130
137
|
pages_completed = int(
|
|
@@ -144,10 +151,14 @@ class LinkedIn(Scraper):
|
|
|
144
151
|
and start < 1000
|
|
145
152
|
and pages_completed < scraper_input.max_pages
|
|
146
153
|
):
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
154
|
+
total_pages = min(
|
|
155
|
+
scraper_input.max_pages,
|
|
156
|
+
math.ceil(
|
|
157
|
+
(scraper_input.results_wanted + scraper_input.offset)
|
|
158
|
+
/ self.jobs_per_page
|
|
159
|
+
),
|
|
150
160
|
)
|
|
161
|
+
log.info(f"search page: {pages_completed + 1} / {total_pages}")
|
|
151
162
|
params = {
|
|
152
163
|
"keywords": scraper_input.search_term,
|
|
153
164
|
"location": scraper_input.location,
|
|
@@ -208,6 +219,8 @@ class LinkedIn(Scraper):
|
|
|
208
219
|
job_id = href.split("-")[-1]
|
|
209
220
|
if not job_id:
|
|
210
221
|
continue
|
|
222
|
+
if context.already_seen_identity(f"li-{job_id}"):
|
|
223
|
+
continue
|
|
211
224
|
|
|
212
225
|
try:
|
|
213
226
|
fetch_desc = scraper_input.linkedin_fetch_description
|
|
@@ -224,6 +237,7 @@ class LinkedIn(Scraper):
|
|
|
224
237
|
|
|
225
238
|
next_start = start + len(job_cards)
|
|
226
239
|
raw_seen = raw_seen + len(job_cards) if raw_seen is not None else None
|
|
240
|
+
has_more = None if len(job_cards) >= self.jobs_per_page else False
|
|
227
241
|
context.emit_progress(
|
|
228
242
|
{
|
|
229
243
|
"start": next_start,
|
|
@@ -232,17 +246,15 @@ class LinkedIn(Scraper):
|
|
|
232
246
|
},
|
|
233
247
|
completed_units=pages_completed + 1,
|
|
234
248
|
raw_items_seen=raw_seen,
|
|
235
|
-
has_more=
|
|
249
|
+
has_more=has_more,
|
|
236
250
|
message=f"completed LinkedIn page at offset {start}",
|
|
237
251
|
)
|
|
238
252
|
pages_completed += 1
|
|
239
253
|
start = next_start
|
|
240
|
-
if
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
random.uniform(self.delay, self.delay + self.band_delay)
|
|
245
|
-
)
|
|
254
|
+
if not context.should_continue or has_more is False:
|
|
255
|
+
break
|
|
256
|
+
if pages_completed < scraper_input.max_pages and not context.wait(
|
|
257
|
+
random.uniform(self.delay, self.delay + self.band_delay)
|
|
246
258
|
):
|
|
247
259
|
break
|
|
248
260
|
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "jobstreaming"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.4"
|
|
8
8
|
description = "Stream normalized jobs from multiple boards with typed events and durable checkpoints"
|
|
9
9
|
authors = [{ name = "JobStreaming contributors" }]
|
|
10
10
|
license = "MIT"
|
|
@@ -108,8 +108,8 @@ infer-return-types = "never"
|
|
|
108
108
|
|
|
109
109
|
[tool.poetry.group.dev.dependencies]
|
|
110
110
|
black = ">=24.0"
|
|
111
|
-
pre-commit = ">=4.6.
|
|
112
|
-
pyrefly = "1.
|
|
111
|
+
pre-commit = ">=4.6.2"
|
|
112
|
+
pyrefly = "1.2.0"
|
|
113
113
|
pytest = ">=8.0"
|
|
114
114
|
pytest-cov = ">=6.0"
|
|
115
|
-
ruff = ">=0.16.
|
|
115
|
+
ruff = ">=0.16.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|