19 Commits

Author SHA1 Message Date
Bo Peng
236a2c719a Allow different browsers 2025-11-03 23:16:22 -06:00
Bo Peng
e3959a275c release ai-marketplace-monitor 0.9.10 2025-09-17 23:31:09 -05:00
Bo
9bb9d0b944 Make keyboard monitoring optional (#259) (#260)
* Make keyboard monitoring optional (#259)

* release version 0.9.9
2025-09-17 08:58:24 -05:00
Bo Peng
732bb69db0 release version 0.9.8 2025-08-09 20:45:08 -05:00
Bo Peng
000e3f403c release version 0.9.7 2025-08-09 20:28:44 -05:00
adawalli
eb8763226f Fix premature keyword filtering in Facebook marketplace scraping (#248)
* Fix premature keyword filtering in Facebook marketplace scraping

Addresses a critical bug where listings were incorrectly rejected during
keyword filtering before their descriptions had been extracted from
Facebook's detail pages.

## Problem

The dual-check workflow was failing:
1. First check_listing() call: On search results with empty descriptions
2. Second check_listing() call: After get_listing_details() populates descriptions

Listings with keywords only in descriptions were being rejected prematurely,
causing false negatives for valid matches.

## Solution

- Add description_available parameter to check_listing() to control filtering
- Skip keyword filtering when descriptions haven't been fetched yet
- Maintain antikeyword filtering on available text (title-only or title+description)
- Add warning logs when description extraction fails

## Changes

- facebook.py: Add description_available parameter and conditional filtering logic
- monitor.py: Add defensive tuple unpacking for get_listing_details() return value
- Add comprehensive test suite for keyword filtering edge cases
- Fix minor formatting inconsistencies throughout codebase

## Testing

- New test suite demonstrates the bug and validates the fix
- Tests cover keyword filtering with/without descriptions
- Antikeyword filtering verified to work correctly in all cases
- All existing tests continue to pass

Fixes: #247

* Apply minor code improvements from PR feedback

- Remove redundant description_available=True parameter (uses default)
- Move self.logger check to outer if condition to avoid nested checks

These changes improve code clarity and efficiency.
2025-08-09 20:28:14 -05:00
adawalli
2295bcc696 feat: add comprehensive Telegram notification support (#231)
* feat: add comprehensive Telegram notification support

Add complete Telegram bot integration for AI Marketplace Monitor notifications:

- Implement TelegramNotificationConfig with bot token and chat ID authentication
- Add MarkdownV2 message formatting with proper escaping for Telegram
- Implement intelligent message splitting for 4096 character limit
- Add global rate limiting (30 messages/second) with automatic retry logic
- Support for HTTP 429 handling and connection error recovery
- Add configuration validation and detailed error handling
- Include comprehensive unit tests with async operation mocking
- Add detailed setup documentation with troubleshooting guide
- Support environment variable configuration for security
- Compatible with individual users and group chats

Includes dependency: python-telegram-bot for reliable Telegram API integration

* refactor: remove redundant telegram auto-creation logic

- Remove duplicate telegram notification creation in config.py since notify_all already handles this
- Fix unnecessary else clause after early return in telegram.py
- Remove obsolete tests for auto-creation behavior
- Clean up unused imports

The notification system continues to work via the existing notify_all method which dynamically creates notification objects when user configs contain required fields.

* refactor: simplify message splitting using textwrap module

Replace manual word boundary splitting logic with Python's built-in
textwrap.wrap() function. This reduces ~30 lines of custom logic to
a single line while maintaining identical functionality.

- Use textwrap.wrap() with break_long_words=False
- Maintains word boundary splitting behavior
- All existing tests continue to pass
2025-08-04 19:40:55 -05:00
adawalli
8ebe1602bc Fix CLI test failures by adding missing monitor_config type validation (#229)
- Add monitor_config: dict to key_types dictionary in test_config function
- Resolves KeyError: 'monitor_config' that was causing 9 test failures
- All CLI config tests now pass (65 passed, 1 skipped)
2025-07-31 21:40:43 -05:00
Bo Peng
978e40e0bb Release of version 0.9.6 2025-07-26 20:40:45 -05:00
Bo Peng
6a153d3fa6 revert rotating vpn patch 2025-07-25 23:26:42 -05:00
Bo Peng
44c415b90a fix tests 2025-07-25 22:37:18 -05:00
Bo Peng
76721ea459 Fix tests 2025-07-25 22:26:59 -05:00
Bo
afd163ff0c Fix display of pushbullet (close #155) (#156)
* Fix display of pushbullet (close #155)

* Fix pushbullet

* Release version 0.9.5
2025-05-19 18:40:02 -05:00
Bo
56bf13d091 add option category (#150)
* add option category

* Fix syntax error

* fix tests

* Update facebook.py with all categories (#151)

* document option category

---------

Co-authored-by: spawnpoint <spawnpoint@users.noreply.github.com>
2025-05-19 01:02:19 -05:00
Bo
c90523f2b6 Improve pushover (#132) (#133)
* Improve pushover (#132)
2025-04-14 14:21:47 -05:00
Bo
c53cf7f0d3 Issue102 (#131)
Fix pushover support #102
2025-04-13 22:37:40 -05:00
Bo
20730dcb9e Allow currency conversion (#123)
#122 support multiple currencies
2025-04-07 09:45:21 -05:00
Bo
247f8029e6 Fix test (#103) 2025-03-16 23:01:24 -05:00
Bo Peng
75bceef3c6 Re-upload under an AGPL license 2025-03-14 14:39:23 -05:00