Interesting robot clock at http://qrtime.com.

————————————
Continuing my series on page scraping (or baby steps to data mining) at www.instructables.com. The latest instructable number 128 has not shown up yet in the mix. Basically it was an extension of the previous instructable. The goal was to be able ton extract view counts from the web site and import them into a spreadsheet.

Original data: (url’s of the instructables you want to capture.

idata: (not do not type in “[data]” or [/data] or you will get an error)
[data]
http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/
http://www.instructables.com/id/Gut-Check-Fridge-a-Tweeting-and-Facebooking-Fri/
http://www.instructables.com/id/Air-quality-balloons/
http://www.instructables.com/id/Sun-Bottles/
http://www.instructables.com/id/Wrap-around-workbench-under-100/
http://www.instructables.com/id/Solar-PV-tracker/
[/data}

We now have a modified program:

gidata2ss.sh:

#================================
#
# Instructablesnumbers catcher
#
#=================================
# Assignments
# --------------------------------
szAnswer=$(zenity --file-selection --title="Select a iurl file to read")
datafile=$szAnswer
outfile="inumdata"
# the date
tmon=$(date +"%b")
tday=$(date +"%d")
echo "The views for $dj on $tmon $tday:" > $outfile
#=================================
#
# Data input
#---------------------------------
while read line
do theurl=$line
# uncomment the following line if you want to see the url and or views
echo "$theurl"
# get total views
# elinks "$theurl" | grep "Total Views"
# get all the info
# elinks "$theurl" | grep Views
# just get numbers
elinks "$theurl" | grep "Total Views" | cut -c 16-25 | sed 's,,,,g' >> $outfile
done < $datafile
zenity --text-info --filename=$outfile

Run program to get data.
Start new spreadsheet.
Copy and paste numbers into spreadsheet (use fixed with and special numbers)
Add column titles
Copy paste URL’s (with fixed length.)
Save and done.

Included a short movie to show how it works.

————————————
Made a new ota dtv fractal based antenna.


————————————
Baked chicken from a whole chicken I butchered (for the first time). Never hurts to learn a new skill.

Good day.

Advertisements