Commit Graph

733 Commits

Author SHA1 Message Date
Jens
08a60c2043 chore: remove pip 25.2 audit exception after pip 25.3 release (#661) 2025-10-25 20:40:45 +02:00
kleinanzeigen-bot-tu[bot]
06bbd0ef6f chore: ✔ Update pip 25.2 -> 25.3 (#659)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-25 12:23:09 +02:00
Jens
ae5b09a997 feat: add CodeRabbit configuration and propose adopting CodeRabbit (#656) 2025-10-25 12:21:52 +02:00
kleinanzeigen-bot-tu[bot]
27a17f3e56 chore: Update Python dependencies (#657)
✔ Update typer 0.19.2 -> 0.20.0 successful
  ✔ Update ruamel-yaml 0.18.15 -> 0.18.16 successful
  ✔ Update ruff 0.14.1 -> 0.14.2 successful
  ✔ Update basedpyright 1.31.7 -> 1.32.1 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-24 12:44:06 +02:00
kleinanzeigen-bot-tu[bot]
20e43db2ef chore: ✔ Update psutil 7.1.0 -> 7.1.1 (#655)
✔ Update psutil 7.1.0 -> 7.1.1 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-20 12:42:16 +02:00
Jens
06a716f87a fix: condition dialog selector for special attributes (#653)
## ℹ️ Description
*Provide a concise summary of the changes introduced in this pull
request.*

- Link to the related issue(s): Issue #648
- Fix condition dialog selector that was failing to open and select
condition values for special attributes during ad publishing.

## 📋 Changes Summary

- Remove unused condition_mapping dictionary that was not needed
- Fix dialog button selector to use aria-haspopup attribute instead of
non-existent SelectionButton class
- Fix radio button selection to use ID selector instead of data-testid
approach
- Simplify confirm button XPath selector for better reliability

### ⚙️ Type of Change
Select the type(s) of change(s) included in this pull request:
- [x] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ]  New feature (adds new functionality without breaking existing
usage)
- [ ] 💥 Breaking change (changes that might break existing user setups,
scripts, or configurations)


##  Checklist
Before requesting a review, confirm the following:
- [x] I have reviewed my changes to ensure they meet the project's
standards.
- [x] I have tested my changes and ensured that all tests pass (`pdm run
test`).
- [x] I have formatted the code (`pdm run format`).
- [x] I have verified that linting passes (`pdm run lint`).
- [x] I have updated documentation where necessary.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-10-20 09:56:52 +02:00
Jens
339d66ed47 feat: Replace custom RemoteObject wrapper with direct NoDriver 0.47+ usage (#652)
## ℹ️ Description
*Replace custom RemoteObject serialization wrapper with direct NoDriver
0.47+ RemoteObject API usage for better performance and
maintainability.*

- **Motivation**: The custom wrapper was unnecessary complexity when
NoDriver 0.47+ provides direct RemoteObject API
- **Context**: Upgrading from NoDriver 0.39 to 0.47 introduced
RemoteObject, and we want to use it as intended
- **Goal**: Future-proof implementation using the standard NoDriver
patterns

## 📋 Changes Summary

- Replace custom serialization wrapper with direct RemoteObject API
usage
- Implement proper RemoteObject detection and conversion in
web_execute()
- Add comprehensive _convert_remote_object_value() method for recursive
conversion
- Handle key/value list format from deep_serialized_value.value
- Add type guards and proper type checking for RemoteObject instances
- Maintain internal API stability while using RemoteObject as intended
- Add 19 comprehensive test cases covering all conversion scenarios
- Application tested and working with real ad download, update and
publish

### ⚙️ Type of Change
- [x]  New feature (adds new functionality without breaking existing
usage)
- [x] 🐞 Bug fix (non-breaking change which fixes an issue)

##  Checklist
- [x] I have reviewed my changes to ensure they meet the project's
standards.
- [x] I have tested my changes and ensured that all tests pass (pdm run
test).
- [x] I have formatted the code (pdm run format).
- [x] I have verified that linting passes (pdm run lint).
- [x] I have updated documentation where necessary.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-10-20 08:52:06 +02:00
Jens
a9643d916f fix: resolve nodriver RemoteObject conversion bug (#651)
## ℹ️ Description
*Fixes the nodriver 0.47.0 RemoteObject conversion bug that was causing
KeyError and TypeError when accessing BelenConf dimensions.*

- Link to the related issue(s): Issue #650
- The bot was crashing when downloading ads because nodriver 0.47.0 was
returning JavaScript objects as lists of [key, value] pairs instead of
proper Python dictionaries, causing BelenConf dimensions to be
inaccessible.

## 📋 Changes Summary

- **Fixed nodriver RemoteObject conversion bug** in
`web_scraping_mixin.py`:
- Added detection logic for list-of-pairs format in `web_execute` method
- Enhanced `_convert_remote_object_dict` to recursively convert nested
structures
  - Now properly converts JavaScript objects to Python dictionaries
- **Bot functionality fully restored** - can now download ads with
subcategories and special attributes

### ⚙️ Type of Change
- [x] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ]  New feature (adds new functionality without breaking existing
usage)
- [ ] 💥 Breaking change (changes that might break existing user setups,
scripts, or configurations)

##  Checklist
- [x] I have reviewed my changes to ensure they meet the project's
standards.
- [x] I have tested my changes and ensured that all tests pass (`pdm run
test`).
- [x] I have formatted the code (`pdm run format`).
- [x] I have verified that linting passes (`pdm run lint`).
- [x] I have updated documentation where necessary.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-10-19 21:39:05 +02:00
kleinanzeigen-bot-tu[bot]
19c0768255 chore: ✔ Update iniconfig 2.1.0 -> 2.3.0 (#649)
✔ Update iniconfig 2.1.0 -> 2.3.0 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-19 13:37:39 +02:00
Jens
0ee0b2a4dc feat: improve codecov configuration for more reliable PR coverage checks (#646)
## ℹ️ Description
*Improve codecov configuration to address erratic PR blocking behavior
and provide better developer visibility into coverage impact.*

- Addresses inconsistent flag definitions between codecov.yml and
workflow
- Resolves confusing threshold values and separate flag status checks
- Improves developer experience with comprehensive PR comments

## 📋 Changes Summary

- Replace separate flag checks with single combined project coverage
check (70% target)
- Add patch coverage check (80% target) to catch regressions in changed
code
- Add comprehensive PR comments showing project, patch, and file-level
coverage
- Configure flag carryforward for better handling of partial test runs
- Remove confusing 0.2% integration threshold and separate flag status
checks
- Validate configuration with Codecov's official endpoint

### ⚙️ Type of Change
Select the type(s) of change(s) included in this pull request:
- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
- [x]  New feature (adds new functionality without breaking existing
usage)
- [ ] 💥 Breaking change (changes that might break existing user setups,
scripts, or configurations)

##  Checklist
Before requesting a review, confirm the following:
- [x] I have reviewed my changes to ensure they meet the project's
standards.
- [x] I have tested my changes and ensured that all tests pass (`pdm run
test`).
- [x] I have formatted the code (`pdm run format`).
- [x] I have verified that linting passes (`pdm run lint`).
- [x] I have updated documentation where necessary.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-10-18 19:44:11 +02:00
Jens
8aee313aba fix: resolve nodriver 0.47+ RemoteObject compatibility issues (#645)
## ℹ️ Description
*Provide a concise summary of the changes introduced in this pull
request.*

- Link to the related issue(s): #644
- Describe the motivation and context for this change.

This PR resolves compatibility issues with nodriver 0.47+ where
page.evaluate() returns RemoteObject instances that need special
handling for proper conversion to Python objects. The update introduced
breaking changes in how JavaScript evaluation results are returned,
causing TypeError: [RemoteObject] object is not subscriptable errors.

## 📋 Changes Summary

- Fixed TypeError: [RemoteObject] object is not subscriptable in
web_request() method
- Added comprehensive RemoteObject conversion logic with
_convert_remote_object_result()
- Added _convert_remote_object_dict() for recursive nested structure
conversion
- Fixed price field concatenation issue in MODIFY mode by explicit field
clearing
- Updated web_sleep() to accept integer milliseconds instead of float
seconds
- Updated German translations for new log messages
- Fixed linting issues (E711, E712) in test assertions

### ⚙️ Type of Change
Select the type(s) of change(s) included in this pull request:
- [x] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ]  New feature (adds new functionality without breaking existing
usage)
- [ ] 💥 Breaking change (changes that might break existing user setups,
scripts, or configurations)

##  Checklist
Before requesting a review, confirm the following:
- [x] I have reviewed my changes to ensure they meet the project's
standards.
- [x] I have tested my changes and ensured that all tests pass (pdm run
test).
- [x] I have formatted the code (pdm run format).
- [x] I have verified that linting passes (pdm run lint).
- [x] I have updated documentation where necessary.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-10-18 19:38:51 +02:00
kleinanzeigen-bot-tu[bot]
34013cb869 chore: Update Python dependencies (#643)
✔ Update pydantic 2.12.2 -> 2.12.3 successful
  ✔ Update coverage 7.10.7 -> 7.11.0 successful
  ✔ Update ruff 0.14.0 -> 0.14.1 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-18 13:51:29 +02:00
kleinanzeigen-bot-tu[bot]
f76e3b69ba chore: Update Python dependencies (#642)
✔ Update pydantic 2.12.1 -> 2.12.2 successful
  ✔ Update pydantic-core 2.41.3 -> 2.41.4 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-15 12:49:42 +02:00
Jens
84e9d82a55 fix: increase build timeout from 10 to 20 minutes (#641) 2025-10-15 10:37:10 +02:00
Sebastian Thomschke
dadd08aedb build: upgrade to Python 3.14 (#636)
Co-authored-by: Jens <1742418+1cu@users.noreply.github.com>
2025-10-14 15:56:35 +02:00
kleinanzeigen-bot-tu[bot]
799ec447af chore: Update Python dependencies (#640)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-14 12:32:55 +02:00
Jens
7b4b7907d0 feat: cleanup test structure and remove BelenConf testing (#639) 2025-10-14 09:50:50 +02:00
kleinanzeigen-bot-tu[bot]
ff0be420e7 chore: Update Python dependencies (#637)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-13 17:31:47 +02:00
dependabot[bot]
9ed4d48315 ci(deps): bump github/codeql-action from 3 to 4 (#638)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 17:15:07 +02:00
Jens
36ca178574 feat: upgrade nodriver from 0.39 to 0.47 (#635)
## ℹ️ Description
Upgrade nodriver dependency from pinned version 0.39.0 to latest 0.47.0
to resolve browser startup issues and JavaScript evaluation problems
that affected versions 0.40-0.44.

- Link to the related issue(s): Resolves nodriver compatibility issues
- This upgrade addresses browser startup problems and window.BelenConf
evaluation failures that were blocking the use of newer nodriver
versions.

## 📋 Changes Summary

- Updated nodriver dependency from pinned 0.39.0 to >=0.47.0 in
pyproject.toml
- Fixed RemoteObject handling in web_execute method for nodriver 0.47
compatibility
- Added comprehensive BelenConf test fixture with real production data
structure
- Added integration test to validate window.BelenConf evaluation works
correctly
- Added German translation for new error message
- Replaced real user data with privacy-safe dummy data in test fixtures

### 🔧 Type Safety Improvements

**Added explicit `str()` conversions to resolve type inference issues:**

The comprehensive BelenConf test fixture contains deeply nested data
structures that caused pyright's type checker to infer complex
dictionary types throughout the codebase. To ensure type safety and
prevent runtime errors, I added explicit `str()` conversions in key
locations:

- **CSRF tokens**: `str(csrf_token)` - Ensures CSRF tokens are treated
as strings
- **Special attributes**: `str(special_attribute_value)` - Converts
special attribute values to strings
- **DOM attributes**: `str(special_attr_elem.attrs.id)` - Ensures
element IDs are strings
- **URL handling**: `str(current_img_url)` and `str(href_attributes)` -
Converts URLs and href attributes to strings
- **Price values**: `str(ad_cfg.price)` - Ensures price values are
strings

These conversions are defensive programming measures that ensure
backward compatibility and prevent type-related runtime errors, even if
the underlying data structures change in the future.

### ⚙️ Type of Change
- [x]  New feature (adds new functionality without breaking existing
usage)
- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ] 💥 Breaking change (changes that might break existing user setups,
scripts, or configurations)

##  Checklist
Before requesting a review, confirm the following:
- [x] I have reviewed my changes to ensure they meet the project's
standards.
- [x] I have tested my changes and ensured that all tests pass (`pdm run
test`).
- [x] I have formatted the code (`pdm run format`).
- [x] I have verified that linting passes (`pdm run lint`).
- [x] I have updated documentation where necessary.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-10-12 21:22:46 +02:00
Jens
a2745c03b2 fix: resolve linting errors after dependency updates (#634) 2025-10-12 14:45:59 +02:00
kleinanzeigen-bot-tu[bot]
f2f139617b chore: Update Python dependencies (#630)
✔ Update filelock 3.19.1 -> 3.20.0 successful
  ✔ Update click 8.2.1 -> 8.3.0 successful
  ✔ Update maison 2.0.0 -> 2.0.2 successful
  ✔ Update certifi 2025.8.3 -> 2025.10.5 successful
  ✔ Update platformdirs 4.4.0 -> 4.5.0 successful
  ✔ Update msgpack 1.1.1 -> 1.1.2 successful
  ✔ Update pyparsing 3.2.4 -> 3.2.5 successful
  ✔ Update pyinstaller-hooks-contrib 2025.8 -> 2025.9 successful
  ✔ Update pytest-rerunfailures 16.0.1 -> 16.1 successful
  ✔ Update rich 14.1.0 -> 14.2.0 successful
  ✔ Update ruamel-yaml-clib 0.2.12 -> 0.2.14 successful
  ✔ Update pydantic 2.11.9 -> 2.12.0 successful
  ✔ Update typing-inspection 0.4.1 -> 0.4.2 successful
  ✔ Update tomli 2.2.1 -> 2.3.0 successful
  ✔ Update mypy 1.18.1 -> 1.18.2 successful
  ✔ Update coverage 7.10.6 -> 7.10.7 successful
  ✔ Update basedpyright 1.31.4 -> 1.31.7 successful
  ✔ Update pydantic-core 2.33.2 -> 2.41.1 successful
  ✔ Update ruff 0.13.0 -> 0.14.0 successful
  ✔ Update nodejs-wheel-binaries 22.19.0 -> 22.20.0 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-11 17:20:54 +02:00
kleinanzeigen-bot-tu[bot]
a8a3f83925 chore: ✔ Update psutil 7.0.0 -> 7.1.0 (#629)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-18 12:42:04 +02:00
kleinanzeigen-bot-tu[bot]
d96b1d3460 chore: Update Python dependencies (#628)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-17 12:22:26 +02:00
kleinanzeigen-bot-tu[bot]
ee813bcf06 chore: ✔ Update pytest-cov 6.3.0 -> 7.0.0 (#627)
✔ Update pytest-cov 6.3.0 -> 7.0.0 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-10 15:18:46 +02:00
kleinanzeigen-bot-tu[bot]
ea012e634b chore: ✔ Update pytest-cov 6.2.1 -> 6.3.0 (#624)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-09 13:32:22 +02:00
Heavenfighter
c9d5c03ad2 feat: Allow individual shipping without setting shipping costs (#626) 2025-09-09 11:24:46 +02:00
dependabot[bot]
a913d00e23 ci(deps): bump actions/stale from 9 to 10 (#625)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 17:25:39 +02:00
kleinanzeigen-bot-tu[bot]
171996869e chore: Update Python dependencies (#621)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-06 13:15:22 +02:00
kleinanzeigen-bot-tu[bot]
4d39f956f0 chore: Update Python dependencies (#619)
✔ Update pytest-rerunfailures 15.1 -> 16.0 successful
  ✔ Update platformdirs 4.3.8 -> 4.4.0 successful
  ✔ Update typing-extensions 4.14.1 -> 4.15.0 successful
  ✔ Update coverage 7.10.4 -> 7.10.5 successful
  ✔ Update ruff 0.12.9 -> 0.12.11 successful
  ✔ Update basedpyright 1.31.2 -> 1.31.3 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-29 22:25:26 +02:00
kleinanzeigen-bot-tu[bot]
7b898a9136 chore: Update Python dependencies (#617)
✔ Update jaraco-functools 4.2.1 -> 4.3.0 successful
  ✔ Update requests 2.32.4 -> 2.32.5 successful
  ✔ Update ruamel-yaml 0.18.14 -> 0.18.15 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jens Bergmann <1742418+1cu@users.noreply.github.com>
2025-08-20 21:20:52 +02:00
Jens Bergmann
37a36988c3 fix: improve Chrome version detection to reuse existing browsers (#615) 2025-08-20 12:51:13 +02:00
dependabot[bot]
21cdabb469 ci(deps): bump amannn/action-semantic-pull-request from 5 to 6 (#616)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-19 00:44:52 +02:00
Jens Bergmann
332926519d feat: chrome version detection clean (#607) 2025-08-18 13:19:50 +02:00
Jens Bergmann
df24a675a9 fix: resolve #612 FileNotFoundError and improve ad download architecture (#613) 2025-08-17 17:49:00 +02:00
kleinanzeigen-bot-tu[bot]
c1b273b757 chore: Update Python dependencies (#610)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-17 12:24:38 +02:00
Heavenfighter
252dd52632 fix: refactored approval message detection (#608) 2025-08-13 18:00:24 +02:00
Heavenfighter
a1fe36f925 fix: publishing without images (#609) 2025-08-13 17:59:29 +02:00
Jens Bergmann
c9d04da70d feat: browser connection improvements (#601) 2025-08-13 09:29:25 +02:00
Heavenfighter
b94661c4d5 fix: handle security message during ad update (#605) 2025-08-12 19:28:19 +02:00
kleinanzeigen-bot-tu[bot]
6f4a4e319d chore: Update Python dependencies (#603)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-12 16:43:13 +02:00
Jens Bergmann
91a40b0116 feat: enhanced folder naming (#599) 2025-08-12 10:43:26 +02:00
dependabot[bot]
1e0c7216ad ci(deps): bump actions/checkout from 4 to 5 (#602)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 00:55:04 +02:00
dependabot[bot]
40b0a8a252 ci(deps): bump actions/download-artifact from 4 to 5 (#600)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 23:36:33 +02:00
kleinanzeigen-bot-tu[bot]
7b289fc9ba chore: Update Python dependencies (#596)
✔ Update types-requests 2.32.4.20250611 -> 2.32.4.20250809 successful
  ✔ Update charset-normalizer 3.4.2 -> 3.4.3 successful
  ✔ Update coverage 7.10.2 -> 7.10.3 successful
  ✔ Update ruff 0.12.7 -> 0.12.8 successful

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-11 22:18:48 +02:00
kleinanzeigen-bot-tu[bot]
eeaa01f420 chore: ✔ Update packageurl-python 0.17.4 -> 0.17.5 (#595) 2025-08-07 19:07:03 +02:00
Heavenfighter
6b29b9d314 fix: "No HTML element found using CSS selector" during ad download (#594) 2025-08-06 15:15:11 +02:00
kleinanzeigen-bot-tu[bot]
9556fc2a91 chore: Update Python dependencies (#593)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-06 15:02:20 +02:00
kleinanzeigen-bot-tu[bot]
937bc67225 chore: Update Python dependencies (#591)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-03 13:07:29 +02:00
kleinanzeigen-bot-tu[bot]
202c77e3cb chore: Update Python dependencies (#589) 2025-07-31 21:34:26 +02:00