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

Is this still active #29

Closed
Sbphillips19 opened this issue May 16, 2020 · 3 comments
Closed

Is this still active #29

Sbphillips19 opened this issue May 16, 2020 · 3 comments

Comments

@Sbphillips19
Copy link

Sbphillips19 commented May 16, 2020

It's hard to tell given lifts are shut down, but the links provided are no longer active:

http://acme.com/lift/status

That leads to a dead end. I am assuming the api used just isn't active anymore, but maybe I am doing something wrong

Not sure how I would add resorts if I don't know the accurate names:

Short name of the resort [acme]:
Human readable name of the resort [Acme Ski]:
URL of the page with lift status [http://acme.com/lift/status]:

I tried by just making my own:

prompt: Short name of the resort [acme]:  Timberline
prompt: Human readable name of the resort [Acme Ski]:  Timberline Lodge
prompt: URL of the resort website [http://acme.com]:  https://www.timberlinelodge.com/
prompt: Comma separated list of tags [Colorado, Vail, New Hampshire]:  Timberline, Timberline Lodge, Oregon
prompt: Twitter handle (without @) [acme]:  timberlinelodge
prompt: Resort location [longitude, latitude]:  45.3311, -121.7110
prompt: Opening date [YYYY-MM-DD]:  2019-11-28
Generating files for Timberline Lodge
Generating /Users/stephenphillips/Desktop/liftie/lib/resorts/Timberline/index.js...
Generating /Users/stephenphillips/Desktop/liftie/lib/resorts/Timberline/resort.json...
Generating /Users/stephenphillips/Desktop/liftie/test/resorts/Timberline.js...
Fetching https://www.timberlinelodge.com/ to /Users/stephenphillips/Desktop/liftie/test/resorts/example/Timberline.html...
(node:72389) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

This doesn't pass tests:

  1) parse Timberline
       should return lift status:

      Uncaught AssertionError: expected Object {} to equal Object { 'lift 1': 'open' }
      + expected - actual

      -{}
      +{
      +  "lift 1": "open"
      +}
@pirxpilot
Copy link
Owner

Yup. Absolutely active. Acme is just an example.

The test is meant to fail, since you actually need to specify the proper selector in lib/resort/timberline/index.js - something that would find the lift names and statuses on the https://www.timberlinelodge.com/conditions page...

Name of the resort should be lowercase (timberline), the URL should be the page that actually have the list status ( https://www.timberlinelodge.com/conditions ? ) The coordinates should be in latitude/longitude order (think x,y).

Open the PR with what you have already and I'll have a look.

@Sbphillips19
Copy link
Author

I am closing issue. Currently can't get it to work with timberline/ perhaps it doesn't scrape the page correctly, but I will try with a couple other resorts to see if it's just and error from me.

{
  "name": "timberline",
  "url": {
    "host": "https://www.timberlinelodge.com",
    "pathname": "/conditions"
  },
  "tags": [
    "Timberline",
    "Timberline Lodge",
    "Oregon"
  ],
  "ll": [
    -121.711,
    45.3311
  ],
  "twitter": "timberlinelodge",
  "opening": "2019-11-28"
}

pirxpilot added a commit that referenced this issue May 19, 2020
@pirxpilot
Copy link
Owner

I added the Timberline Lodge resort and I tried to leave some breadcrumbs in the git history to clarify what needs to happen for the new resort to be added:

  • fe61858 add scaffold for Timberline Lodge

this is what you get after running bin/generate scripts - tests are failing and there is no status lift displayed but when you run liftie you actually can see a new resort page

  • 6d2b628 add Timberline Lodge lifts to the test

here you add expected list of ski lifts to the test - now the test is still failing but you see what you are aiming for

  • 8a2baed add parser for Timberline Lodge

most important one - this actually implements ski lift status parser - it adds CSS expressions that find the relevant info in the HTML - it's a creative part 😄

  • da1756d improve weather forecast for Timberline Lodge

extra credit - US resorts can have more precise weather forecast if there is a NOAA station nearby - all it takes to find and add it is bin/fetch-noaa --overwrite timberline-lodge

  • de0951e add webcams to Timber Lodge

another extra credit 🏅 - normally just specifying position would add some webcams to the liftie page but you can also just add links to the webcams in resort.json descriptor

Please note: for some reason - probably the demise of the webcam.trave API this does not work at the moment. I'll see what I can do to fix it.

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

No branches or pull requests

2 participants