CrazyEngineers
  • While waiting for today's CE grand quiz question - reloading, and reloading - I wrote a python script to automate the process 😉

    Here is it:

    [COLOR=#808080]#!/usr/bin/env python
     
    # Check for new CE Grand Quiz question
    # Author: Rahul Anand  | Homepage: https://eternalthinker.blogspot.com/[/COLOR]
    
    import urllib2, urllib, re, time, os
    
    qnum = raw_input("Enter the upcoming question's number: ")
    
    while(True):
            if re.search("""Grand Quiz Question #"""+qnum, urllib2.urlopen('https://www.crazyengineers.com/forum/ce-quiz-puzzles-mathematics/').read())!= None:               
                    os.system("[COLOR=#008000]D:\installed\Xion\Xion.exe[/COLOR]")
                    break
            time.sleep([COLOR=#008000]10[/COLOR])   
    
    Run the code, enter the question number you are waiting for, and when the question appears, the script performs an alerting action.

    Note the parts in green:
    -------------------------
    * The second one is the number of seconds between subsequent checks for the CE page
    * The first one is a system command which you can use to perform an alerting action
    (Here I gave the command to run my Xion music player, which will start playing the song the moment it opens. Works as a pretty good alert!)
    Change it with your own values
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Anil Jain

    MemberNov 9, 2011

    CRAZy
    Are you sure? This action cannot be undone.
    Cancel
  • silverscorpion

    MemberNov 9, 2011

    Wow!! Fantastic!

    Thanks 😀
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register