Changed time

master
Stephen Cochrane 3 years ago
parent 71df72e1fa
commit d988996a7f
  1. 2
      wod

2
wod

@ -1,7 +1,7 @@
#!/bin/bash
# Prints the word of the day from merriam webster along with its definition.
html=$(curl -s --connect-timeout 0.05 https://www.merriam-webster.com/word-of-the-day)
html=$(curl -s --connect-timeout 0.1 https://www.merriam-webster.com/word-of-the-day)
wod=$(echo "$html" | grep -Eo "<h1>\w+</h1>" | sed -E 's|<h1>(\w+)</h1>|\1|g') # Parse word of the day.
def=$(echo "$html" | grep -Eo '<strong>:</strong>.+</p>' | sed -E 's|<strong>:</strong> (.+)</p>|\1|g') # Parse definition

Loading…
Cancel
Save