Season 46 Players bash script
This sloppy bash script generates the above html players table from this site:
ew.com/survivor-46-cast-contestants-revealed-8557…
Maybe this can be expanded to track player eliminations.
Hopefully this code posts correctly…
<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">#
</span><span style="color:#323232;"># List Survivor Season 46 Players
</span><span style="color:#323232;">#
</span><span style="color:#323232;">#
</span><span style="color:#323232;">
</span><span style="color:#323232;">URL=https://ew.com/survivor-46-cast-contestants-revealed-8557071
</span><span style="color:#323232;">
</span><span style="color:#323232;">cat <
</span><span style="color:#323232;">DONE
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">wget $URL -O -
</span><span style="color:#323232;"> | grep -A 5 "mntl-sc-block-heading__text"
</span><span style="color:#323232;"> | sed 's/.*__text"> /<div><div>/g'
</span><span style="color:#323232;"> | sed 's/</span.*/<br>/g'
</span><span style="color:#323232;"> | sed 's/</img></div>/g'
</span><span style="color:#323232;"> | sed '/^--$/d'
</span><span style="color:#323232;"> | sed '/^$/d'
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">echo "</div>"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span>
</div>
Add comment