I cannot add a comment but to completely turn off the screen blanking I usually use this
xset -dpms &
xset s noblank &
xset s off &
I'm not an expert on sqlite files but you can maybe use a command like
sqlite3 ./.mozilla/firefox/*default/places.sqlite "select a.url from moz_places a;" | grep bbc.co.uk/iplayer
and try to get a timestamp to check against to trigger the turning off of the screen blanking.
Hope this could be of some use!
I digged a little bit into it and came out with this python script
shell_cmd = ('sqlite3 ~/.mozilla/firefox/*default/places.sqlite '
'"select b.visit_date, a.url from moz_places a, '
'moz_historyvisits b where a.url like '
proc = subprocess.check_output(shell_cmd, shell=True)
dates = [x[:10] for x in proc.split()]
current_date = subprocess.Popen(['date', '+%s'],
last_visit = get_last_visit()
current_date = get_curren_date()
if current_date - last_visit < 300:
subprocess.call(['xset', 's', 'noblank'])
subprocess.call(['xset', 's', 'off'])
if __name__ == '__main__':
I haven't tested it but you can try to add it to your crond to execute every 5 minutes, should check to see if you were on the bbc/iplay website in the last five minutes and if yes turn off screen blanking.
Its far from perfect but I hope that someone can improve it and give suggestions!