Skip to content

Conversation

@saattrupdan
Copy link
Owner

@saattrupdan saattrupdan commented Apr 19, 2025

Added

  • Added new --min-monthly-fee and --max-monthly-fee options to filter flats by
    monthly fee. The default is no minimum or maximum monthly fee.
  • Added new --cache/--no-cache flag, which allows you to disable the cache. The
    default behaviour is still to use the cache, but you can disable it by using the
    --no-cache flag. This is useful if you want to see all the results, and not just the
    new ones. The cache is stored in the .boligping_cache file in the current directory.

Changed

  • Changed the --query (-q) option to now search for the selected keywords in the
    description of the flat, rather than use Boligsiden.dk's own keywords, since many
    flats do not use these keywords. Remember that you can specify multiple queries with,
    e.g., bolig-ping <other-arguments> -q badekar -q altan.

@saattrupdan saattrupdan requested a review from Copilot April 19, 2025 15:22
@saattrupdan saattrupdan self-assigned this Apr 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a feature to filter flat listings based on keywords supplied by the user through the CLI.

  • Removed the use of Boligsiden.dk’s own keywords in URL generation by eliminating the "text" parameter.
  • Updated the scraper to filter flats based on their description and modified the output from HTML to a text format.
  • Adjusted tests, documentation, and the changelog to reflect these changes.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_data_models.py Updated expected URL output to remove the unused "text" parameter.
src/bolig_ping/scraper.py Added filtering logic for keyword queries in flat descriptions.
src/bolig_ping/data_models.py Introduced a new description property and a to_text method; removed URL query parameter based on queries.
src/bolig_ping/cli.py Updated CLI option and output format to align with text-based results.
README.md Updated coverage badge information.
CHANGELOG.md Documented changes for the new keyword search feature.

@saattrupdan saattrupdan changed the title feat: Use keyword search in flat description when user supplies queries Keyword search in flat description, new --no-cache and --max-monthly-fee arguments Apr 19, 2025
@saattrupdan saattrupdan merged commit 506b57a into main Apr 19, 2025
4 checks passed
@saattrupdan saattrupdan deleted the feat/add-flat-description branch April 19, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants