Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stagecoach scraper #258

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Stagecoach scraper #258

wants to merge 5 commits into from

Conversation

JackGilmore
Copy link
Member

@JackGilmore JackGilmore commented Oct 29, 2023

Important

Still in progress. Sharing draft with community

Outstanding tasks

  • Contact Stagecoach to ask them to confirm dataset licence and if they can fix a malformed HTML tag on their website
  • Add datasets into merge_data.py
  • Test full pipeline and check how datasets appear on frontend

Description

  • Stagecoach scraper using new JSON scraper format
  • Adds new common methods to processor.py for HTML scraping too
    • get_html
    • get_html_head
    • get_http_content_length

Motivation and Context

Closes #120

How Has This Been Tested?

Ran script file locally and produces appropriate dataset file in data\bespoke_Stagecoach\Stagecoach.json

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@JackGilmore
Copy link
Member Author

Contacted Stagecoach's open data email address via [email protected] to query license and metadata

- Update Scottish Parliament scraper to use new common classes for JSON output
- Update merge_data.py to use common JSON schema for ScotParl and Stagecoach
@JackGilmore JackGilmore marked this pull request as ready for review November 11, 2023 21:32
@JackGilmore JackGilmore mentioned this pull request Nov 11, 2023
4 tasks
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.

Add Stagecoach Open Data as a source
1 participant