Skip to content

Feature: Extract structured opening hours from place pages #57

Description

@MozzamShahid

File / lines: src/gmaps_scraper/models.py (no opening-hours field); src/gmaps_scraper/place_scraper.py (no extractor)

Problem: The model only has status: str | None, which captures strings like "Open ⋅ Closes 10 PM". There is no field for the full weekly schedule that Google displays in the About/Overview panel.

Why it matters: Opening hours are core place metadata. The current status string is transient (changes with time-of-day) and not machine-parseable.

Suggested fix:

  1. Add an opening_hours field to PlaceDetails (e.g., list of {day, hours, is_open_24h}).
  2. Extract it from the About panel heading aliases for "Hours", "Opening hours", 営業時間, etc.
  3. Add tests with fixtures for English and non-English hour panels.
  4. Keep the raw status field intact for backward compatibility.

Difficulty: medium
Impact: Medium — adds commonly requested structured data without breaking existing output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions