idata: (Note: 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}
Then you need to create a program file to collect the data via web scraping. I did not go to the trouble to make it gui for simplicities sake.
iget.sh
[code]
#================================
#
# Instructablesnumbers catcher
#
#=================================
# Assignments
# --------------------------------
datafile="idata"
# the date
tmon=$(date +"%b")
tday=$(date +"%d")
echo "The views for $dj on $tmon $tday:"
#=================================
#
# Data input
#---------------------------------
while read line
do theurl=$line
# uncomment the following line if you want to see the url and or views
echo -n "$theurl"
# get total views
# elinks "$theurl" | grep "Total Views"
# get all the info
elinks "$theurl" | grep -m 2 Views
# just get numbers
# elinks "$theurl" | grep "Total Views" | cut -c 16-25
# Un remark the next line if you want it to be a bit more readable
# echo ""
done < $datafile
[/code]
Make it a program:
$ chmod +x iget.sh
Run it:
$ ./iget.sh
The views for on Oct 06:
http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/
Total Views: 587
Today Views: 95
http://www.instructables.com/id/Gut-Check-Fridge-a-Tweeting-and-Facebooking-Fri/
Total Views: 618
Today Views: 608
http://www.instructables.com/id/Air-quality-balloons/
Total Views: 54,833
Today Views: 216
http://www.instructables.com/id/Sun-Bottles/
Total Views: 43,876
Today Views: 17
http://www.instructables.com/id/Wrap-around-workbench-under-100/
Total Views: 15,157
Today Views: 12
http://www.instructables.com/id/Solar-PV-tracker/
Total Views: 107,243
Today Views: 46
$ _
The following will save everything to a file if your want.
$ ./iget.sh >> datafile
A real time saver if you have many many instructables and do not want to go through each page to get the data. Follow up instructable: http://www.instructables.com/id/Getting-instructable-counts-continued/
Warning: Data may not be always up to date.
Note: MSWindows version: http://www.instructables.com/id/Getting-instructable-counts-with-MSWindows/







































Sunshiine