Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Videos
  • Top Categories
  • Subscribe via Email
  • Ask A Question
  • Meet Dave
  • Home
  • Linux Shell Script Programming
  • Accuweather changed, and now the ‘weather’ script is broken!

Accuweather changed, and now the ‘weather’ script is broken!

May 26, 2004 / Dave Taylor / Linux Shell Script Programming / 2 Comments

A reader writes in to report that Accuweather has changed their Web page layout and the shell script from Wicked Cool Shell Scripts that returns the weather forecast (script #63, weather.sh), is broken.

He’s right, but amazingly, the fix is less than 25 characters long!

Instead of the embedded sed statement containing:

sed -n '/<font class="sevendayten">/,/[^[:digit:]]<\/font>/p' | \

it should now be replaced with:

sed -n '/Start - Forecast Cell/,/End - Forecast Cell/p'

That’s all there is to it.

Of course, this doesn’t mean that the scripts that are scraping Web sites from my book won’t break again as formats change, but that’s why it’s so helpful for you to try and step through the scripts so you can understand how the script parses the source and extracts the information needed.

And if something else does break, you can always contact me with specific questions!

About the Author: Dave Taylor has been involved with the online world since the early days of the Internet. Author of over 20 technical books, he runs the popular AskDaveTaylor.com tech help site. You can also find his gadget reviews on YouTube and chat with him on Twitter as @DaveTaylor.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

2 comments on “Accuweather changed, and now the ‘weather’ script is broken!”

  1. Jim says:
    February 17, 2010 at 11:21 am

    Does accuweather.com have an imbedded virus/popup problem in Adobe reader from some company trying to sell a virus checker program?

    Reply
  2. Paco says:
    November 10, 2005 at 2:18 pm

    Looks like Accuweather has entered some embedded comments with Real????[TM] in the source. The do not show up in the rendered html page, but they are in the source as comments.
    Example:
    96. Max. UV 6.–>
    Since the script is not set to parse out the comment I get this garbage:
    Today
    Sunshine, very warm and humid – High 89
    96. Max. UV 6.–>
    Is there a way to fix it where I can display the “Real” info properly?
    Also can I scrub it so it does not appear in the output? Just in case the “Real” info is not wanted.
    Thanks – Paco

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • Chromebook Owner’s Guide to Antivirus & Anti-Malware Solutions
  • Everything You Need to Know about Apple’s Clean Energy Charging
  • How Can I Watch Free Classic Movies on my Windows PC?
  • How Can I Maximize Online Privacy with a VPN Connection?
  • SCAM: Did I Just Buy A Computer From Amazon? I Demand a Refund!

On Our YouTube Channel

iClever Bluetooth 34-Key Number Pad Keyboard -- REVIEW

Google Pixel 7 Pro Android Smartphone - UNBOXING

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Amazon, eBay, and Online Shopping Help (164)
  • Android Help (228)
  • Apple iPad Help (147)
  • Apple Watch Help (53)
  • Articles, Tutorials, and Reviews (346)
  • Auto Tech Help (17)
  • Business Advice (200)
  • ChromeOS Help (34)
  • Computer & Internet Basics (782)
  • d) None of the Above (166)
  • Facebook Help (384)
  • Google, Chrome & Gmail Help (188)
  • HTML & Web Page Design (247)
  • Instagram Help (49)
  • iPhone & iOS Help (625)
  • iPod & MP3 Player Help (173)
  • Kindle & Nook Help (99)
  • LinkedIn Help (88)
  • Linux Help (174)
  • Linux Shell Script Programming (90)
  • Mac & MacOS Help (914)
  • Most Popular (16)
  • Outlook & Office 365 Help (33)
  • PayPal Help (68)
  • Pinterest Help (54)
  • Reddit Help (19)
  • SEO & Marketing (82)
  • Spam, Scams & Security (96)
  • Trade Show News & Updates (23)
  • Twitter Help (222)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (951)
  • Wordpress Help (206)
  • Writing and Publishing (72)
  • YouTube Help (47)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (62)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2023 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy