Wednesday 13 February 2019

Magicpin - cashback offers and vouchers near you

Get ₹ 50 instantly on downloading the magicpin app! It helps you to discover incredible offers on restaurants, beauty & fashion outlets around you! No kidding, I've already saved ₹ 50 through magicpin. Use link -http://magicpin.in/getapp/NRZT5037 or apply my referral code: NRZT5037

Friday 15 June 2018

Laaptu Auto Earn

Laaptu SmartPy
from base64 import decodestring
from io import BytesIO
from PIL import Image
from pyperclip import *
from selq import *
from smart import *
from time import * 
import base64
import pytesseract
import re
import sys
import traceback
import requests
burl='http://u.laaptu.com/'
urll=[
'','lost.action?msgnew=',
'login.action',
]
from config import *
if 'about:blank'==url:b.get(burl)
window_changed=bes('return +localStorage.a')
import linecache
import sys

def exception(e):
    exc_type, exc_obj, tb = sys.exc_info()
    f = tb.tb_frame
    lineno = tb.tb_lineno
    filename = f.f_code.co_filename
    linecache.checkcache(filename)
    line = linecache.getline(filename, lineno, f.f_globals)
    print( '{}.{} {}"\n{}'.format(filename.split('\\')[-1], lineno, line.strip(), exc_obj))



def iswc(e='body',uc=0):
 global window_changed
 for i in range(3):
  a=bes('return +localStorage.a')
  if window_changed<a :
   window_changed=a
   if e:
    WebDriverWait(b, 15).until(
     EC.presence_of_element_located((By.CSS_SELECTOR,e)))
   if e!='body': print('waited',e)
   return True
  sleep(3)
 alert('Hey Baby')
 print(e)
 exit()

if bcu().replace(burl,'') in urll:
 print('login')
 bes('window.isClicked=1')
 (bes('return isClicked'))
 (bes(f"document.forms['loginf'].username.value='{un1}'"))
 (bes(f"document.forms['loginf'].password.value='{pwd}'"))
 (bes(f"document.forms['loginf'].submit()"))
 iswc('p.ny_cap')
if 'Validaccount' in bcu():
 bes('document.querySelector("p.ny_cap").setAttribute("style","position: absolute;left:0px;top:-110px;")')
 b.save_screenshot('a.png')
 img = Image.open("a.png")
 area = (10,1, 120,28)
 im = img.crop(area)
 # im.show()
 a=(pytesseract.image_to_string(im))
 a=(a.replace('\n',''))
 bes(f"$('input.bdr3').value='{a}'") 
 # bes("callShift() ") 
 #6digit enough case insenstive 
 exit()

if 'homepage' in bcu():
 a=(bcu()) 
 a=a.replace('homepage','mathquiz')
 b.get(a)
 iswc('#subbtn')
z=3
f=open('a','a')
def bes2(b,a='der'):
 if bes(f"return $('{a}')"):
   bes(b)
   print('closed',a)
def cnm(b):
 bes2(f"closenewmsg('{b}');",'#'+b)
try:
 for i in range(18*3):
  if 'mathquiz.action?id' in bcu():
   try:
    bes2('hideCloud()','cloudnew')
    
    bes2("closeCloudnew('cloudnew2')")
    bes2("closenewmsg('cloudb')",'#cloudb')
    cnm('cloudc')
    pass
   except Exception as e:
    exception(e)
   
   png_arr=bes("return $('#optionansimg').src")
   png_arr = png_arr.split(",")
   png_arr = png_arr[1]

   im = Image.open(BytesIO(base64.b64decode(png_arr)))
   a=(pytesseract.image_to_string(im)[:-1])
   a=re.sub('How ?much is','',a)
   a=re.sub('Find ?out','',a)
   a=re.sub('Solve','',a)
   a=re.sub('X','*',a)
   a=re.sub('\u2014','-',a)
   a=re.sub('What is the solution to\n*','',a)
   a=re.sub('square of (.*)',r'\1** 2',a)
   print(ascii(a))
   a=(eval(a))
   print(a)

   bes(f"$('#quizAnswer').value={a}")
   sleep(1)
   bes('checkAnswer()')
   iswc('#continuebtn')
  if '?pid' in bcu(): 
   print(bcu(),file=f)
   bes('resultpage()')
   iswc('a.sbmt')
  if 'mathquiznext' in bcu(): 
   print(bcu(),file=f)
   sleep(2)
   bes('nextQuestion()')
   iswc('#subbtn')
   # if bes()# bes('hideCloud()') 
except Exception as e:
 exception(e)

Sunday 10 June 2018

Auto Amulyam - Selenium

Amulyam
from selenium.webdriver import ActionChains
from selenium.webdriver.common.keys import Keys
from time import sleep
from pymsgbox import *
import traceback
import requests
import io
import random
import time
import os
import sys
from functools import reduce
# Speech Recognition Imports
from pydub import AudioSegment
import speech_recognition as sr

# Selenium
from selenium.common.exceptions import NoSuchElementException



# Randomization Related
MIN_RAND        = 0.64
MAX_RAND        = 1.27
LONG_MIN_RAND   = 4.78
LONG_MAX_RAND   = 6.1
NUMBER_OF_ITERATIONS = 5
RECAPTCHA_PAGE_URL = "https://www.google.com/recaptcha/api2/demo"

HOUNDIFY_CLIENT_ID = "IzKsCJiiW8nSTZHdTFg0PA=="
HOUNDIFY_CLIENT_KEY = "zLdwMYSaHud27N_V4Y7m_I78sM90ftEVy0p3A041dIkF-kJ8rp1hQJ-sPLPZu5svzPS8SG1LNXCO2rzsPoTItA=="
WIT_AI_KEY="JI5SZWSOEPZQRIZVUDDXNQ7TRYNKYQKS"


DIGITS_DICT = {
    "zero": "0",
    "one": "1",
    "two": "2",
    "three": "3",
    "four": "4",
    "five": "5",
    "six": "6",
    "seven": "7",
    "eight": "8",
    "nine": "9",
    "to": "2",
    "for": "4",
    "sex": "6",
    }
    
class rebreakcaptcha(object):
 def __init__(self,b):
  self.driver = b
  
 def is_exists_by_xpath(self, xpath):
  try:
   self.driver.find_element_by_xpath(xpath)
  except NoSuchElementException:
   return False
  return True
  
 def get_recaptcha_challenge(self):
  for _ in range(10):
   self.driver.switch_to.default_content()
   # self.b.get(RECAPTCHA_PAGE_URL)
   # Navigate to a ReCaptcha page
   # time.sleep(random.uniform(MIN_RAND, MAX_RAND))
   
   # Get all the iframes on the page
   iframes = self.driver.find_elements_by_css_selector("iframe[title^='recaptcha']")
   # Switch focus to ReCaptcha iframe
   self.driver.switch_to_frame(iframes[0])
   # time.sleep(random.uniform(MIN_RAND, MAX_RAND))
   
   # Verify ReCaptcha checkbox is present
   if not self.is_exists_by_xpath('//div[@class="recaptcha-checkbox-checkmark" and @role="presentation"]'):
    print("[{0}] No element in the frame!!".format(self.current_iteration))
    continue
   
   # Click on ReCaptcha checkbox
   self.driver.find_element_by_xpath('//div[@class="recaptcha-checkbox-checkmark" and @role="presentation"]').click()
   sleep(3)
   # time.sleep(random.uniform(LONG_MIN_RAND, LONG_MAX_RAND))  
   # Check if the ReCaptcha has no challenge
   if self.is_exists_by_xpath('//span[@aria-checked="true"]'):
    print("[{0}] ReCaptcha has no challenge.".format(self.current_iteration))
    return False
   else:
    return True
   
 def get_audio_challenge(self, iframes):
  # Switch to the last iframe (the new one)
  self.driver.switch_to_frame(iframes[-1])
  
  # Check if the audio challenge button is present
  if not self.is_exists_by_xpath('//button[@id="recaptcha-audio-button"]'):
   print("[{0}] No element of audio challenge!!".format(self.current_iteration))
   return False
  if not self.is_exists_by_xpath('//button[@id="recaptcha-audio-button"][@style="display: none;"]'):
   print("[{0}] Clicking on audio challenge".format(self.current_iteration))
   # Click on the audio challenge button
   self.driver.find_element_by_xpath('//button[@id="recaptcha-audio-button"]').click()
   # time.sleep(random.uniform(LONG_MIN_RAND, LONG_MAX_RAND))
   sleep(3)
  else:
   print('Already opened')
 
 def get_challenge_audio(self, url):
  request = requests.get(url,headers={'User-Agent':'Mozilla/5.0'})
  audio_file = io.BytesIO(request.content)
  
  # Convert the audio to a compatible format in memory
  converted_audio = io.BytesIO()
  sound = AudioSegment.from_mp3(audio_file)
  sound.export(converted_audio, format="wav")
  converted_audio.seek(0)
  
  return converted_audio
  
  
 def string_to_digits(self, recognized_string):
  print (''.join([DIGITS_DICT.get(word, "|{}|".format(word)) for word in recognized_string.split(" ")]))
  return ''.join([DIGITS_DICT.get(word, "") for word in recognized_string.split(" ")])
 
 def speech_to_text(self, audio_source):
  # Initialize a new recognizer with the audio in memory as source
  recognizer = sr.Recognizer()
  with sr.AudioFile(audio_source) as source:
   audio = recognizer.record(source) # read the entire audio file

  audio_output = ""
  # recognize speech using Google Speech Recognition
  try:
   audio_output = recognizer.recognize_google(audio)
   print("[{0}] Google Speech Recognition: ".format(self.current_iteration) + audio_output)
   if any(character.isalpha() for character in audio_output):audio_output = ""
    
  except sr.UnknownValueError as e:
   print("[{0}] Google Speech Recognition could not understand audio".format(self.current_iteration))
   audio_output = ""

  except sr.RequestError as e:
   print("[{0}] Could not request results from Google Speech Recognition service; {1}".format(self.current_iteration).format(e))
   audio_output = ""
  try:
   if audio_output=='':
    print("[{0}] Fallback to Houndify!".format(self.current_iteration))
    _=4
    _=None
    if _ :
     audio_output = self.string_to_digits(recognizer.recognize_houndify(audio, client_id=HOUNDIFY_CLIENT_ID, client_key=HOUNDIFY_CLIENT_KEY))
    else:
     print('Witty')
     audio_output = self.string_to_digits(recognizer.recognize_wit(audio, key=WIT_AI_KEY))
    print("[{0}] Houndify: ".format(self.current_iteration) + audio_output)
  except sr.UnknownValueError:
   print("Houndify could not understand audio")
  except sr.RequestError as e:
   print("Could not request results from Houndify service; {0}".format(e))   

  return audio_output

 def solve_audio_challenge(self):
  # Verify audio challenge download button is present
  if not self.is_exists_by_xpath('//a[@class="rc-audiochallenge-tdownload-link"]') and \
    not self.is_exists_by_xpath('//div[@class="rc-text-challenge"]'):
   print("[{0}] No element in audio challenge download link!!".format(self.current_iteration))
   return False
  

  # If text challenge - reload the challenge
  for i in range(5):
   if not self.is_exists_by_xpath('//div[@class="rc-text-challenge"]'):break
   print("[{0}] Got a text challenge! Reloading!".format(self.current_iteration))

   self.driver.find_element_by_id('recaptcha-reload-button').click()
   # time.sleep(random.uniform(MIN_RAND, MAX_RAND))
   sleep(1)

  for i in range(3):
   try:
    # Download the 
    # Get the audio challenge URI from the download link
    print('Gotcha')
    download_object = self.driver.find_element_by_xpath('//a[@class="rc-audiochallenge-tdownload-link"]')
    download_link = download_object.get_attribute('href')
    
    # Get the challenge audio to send to Google
    converted_audio = self.get_challenge_audio(download_link)
    audio_output = self.speech_to_text(converted_audio)
    if not audio_output:raise
    break
   except:
    self.driver.find_element_by_id('recaptcha-reload-button').click()
    # time.sleep(random.uniform(MIN_RAND, MAX_RAND))
    audio_output=''
    sleep(2)
   
  # Send the audio to Google Speech Recognition API and get the output
  

  # Enter the audio challenge solution
  self.driver.find_element_by_id('audio-response').send_keys(audio_output)
  # time.sleep(random.uniform(LONG_MIN_RAND, LONG_MAX_RAND))
  time.sleep(random.uniform(MIN_RAND, MAX_RAND))

  # Click on verify
  self.driver.find_element_by_id('recaptcha-verify-button').click()
  # time.sleep(random.uniform(LONG_MIN_RAND, LONG_MAX_RAND))
  time.sleep(random.uniform(MIN_RAND, MAX_RAND))
  
  return True
   
 def solve(self, current_iteration):
  self.current_iteration = current_iteration + 1
  
  # Get a ReCaptcha Challenge
  if not self.get_recaptcha_challenge():return True
  
  # Switch to page's main frame
  self.driver.switch_to.default_content()
    
  # Get all the iframes on the page again- there is a new one with a challenge
  iframes = self.driver.find_elements_by_css_selector("iframe[title^='recaptcha']")
  
  # Get audio challenge
  self.get_audio_challenge(iframes)
  # Solve the audio challenge
  if not self.solve_audio_challenge():
   return False
  sleep(2)
  
  # Check if there is another audio challenge and solve it too
  for _ in range(10):
   if not (self.is_exists_by_xpath('//div[@class="rc-audiochallenge-error-message"]') and \
    self.is_exists_by_xpath('//div[contains(text(), "Multiple correct solutions required")]') ):break
   print("[{0}] Need to solve more. Let's do this!".format(self.current_iteration))
   self.solve_audio_challenge()
   sleep(2)
   # Switch to the ReCaptcha iframe to verify it is solved
   self.driver.switch_to.default_content() 
   
   self.driver.switch_to_frame(iframes[0])
   
   return self.get_recaptcha_challenge()



  return self.is_exists_by_xpath('//span[@aria-checked="true"]')

class Amu:
 def __init__(self,i,b):
  self.b=b
  self.i=i
 def cv(self):
  self.b.execute_script("document.querySelector('form').scrollIntoView();")
  rebreakcaptcha_obj = rebreakcaptcha(b)
  
  counter = 0
  for i in xrange(NUMBER_OF_ITERATIONS):
   if rebreakcaptcha_obj.solve(i):
    print('CV')
    counter += 1
    self.b.switch_to.default_content() 
    return True
   
  self.b.switch_to.default_content()
  return False
 
 def lsl(self,s=1):
  try:
   ls=self.b.execute_script("return +sessionStorage.a")
   if(s):self.b.execute_script("document.forms[0].submit();") 
   for i in range(10):
    if ls!=self.b.execute_script("return +sessionStorage.a"):break
    if(s):sleep(1)
  except Exception as e:
   print('lsl',e)
 
 def login(self,s):
  if self.b.execute_script("return document.querySelector('#profile_part_id.profile_part')"):return
  u=[
  'un'
  ]
  pwd=[
  'pwd'
  ]
  u_=u[s]
  p_=pwd[s]
  self.b.get('http://www.amulyam.in/')
  self.b.execute_script("document.querySelector('#login_email_input_id').value={}".format(u_))
  self.b.execute_script("document.querySelector('#login_pwd_input_id').value='{}'".format(p_))
  self.b.execute_script("document.querySelector('#login_form_submit').click()")
  sleep(2)
  
 
 def loginc(self):
  _='http://www.amulyam.in/daily-login-credits.do'
  if self.b.current_url!=_:self.b.get(_)
  if self.b.execute_script('return document.forms.length'):
   for i in range(10):
    if self.cv() :break
    print('cving')
   self.lsl()
  else:
   print('Done')
 
 def trivia(self):
  _='http://www.amulyam.in/playTrivia.do'
  if 'playTrivia' not in self.b.current_url:self.b.get(_)
  try:
   c=int(self.b.execute_script("return document.querySelector('.question_div span').innerText.split(' ')[0]"))-1
  except:
   c=1
   if self.b.execute_script("return document.querySelectorAll('.amu_add_new a')"):c=25
   if self.b.execute_script("return document.querySelector('.game-completion')"):c=25
  print('Count',c)
  try: 
   for i in range(c,30+c):
    print('No:',i,c+1)
    if c==25 :break
    for j in range(3):
     _="document.getElementsByClassName('jquery-adi light')"
     self.b.execute_script("if ({0}.length){0}[0].remove()".format(_))
     fl=self.b.execute_script('return document.forms.length')
     try:
      c=int(self.b.execute_script("return document.querySelector('.question_div span').innerText.split(' ')[0]"))
     except:c=c
 
     if fl ==0 :
      if 'amulyam' not in self.b.current_url:return
      um='Captcha'
      print(um)
      sleep(3)
      _=self.b.execute_script("if({0}.length) return {0}[0].children[0].href; else return 0".format("document.getElementsByClassName('trivia_ans_options')",random.randrange(5)))
      if(_):self.b.get(_)
     else:
      if self.b.execute_script('return document.forms[0].elements[0].tagName')!="TEXTAREA" and j==0:
       um='Trivia'
       print(um)
       self.lsl()
     
      elif self.b.execute_script('return document.forms[0].elements[0].tagName')=="TEXTAREA":
       um='ReCaptcha'
       print(um)
       for i in range(10):
        if self.cv() :break
        print('cving')
       self.lsl()
    
    
   if self.b.execute_script("return document.querySelectorAll('.amu_add_new a')"):
    cw = self.b.current_window_handle
    self.b.execute_script("for (a of document.querySelectorAll('.amu_add_new a'))a.click()")
    sleep(3)   
    self.b.switch_to_window(self.b.window_handles[1]);self.lsl(0);self.b.close()
    self.b.switch_to_window(self.b.window_handles[1]);self.lsl(0);self.b.close()
    self.b.switch_to_window(cw)
    self.lsl()
 
  except Exception as e:
   self.b.switch_to.default_content()
   self.fexc(e)
 
 def voc(self):
  if 'Voca' not in self.b.current_url:self.b.get('http://www.amulyam.in/vocabulary.do')
  try:
   c=int(self.b.execute_script("return document.querySelector('.question_div span').innerText.split(' ')[1]"))-1
  except:
   c=1
   if self.b.execute_script("return document.querySelectorAll('.amu_add_new a')"):c=15
   if self.b.execute_script("return document.querySelector('.game-completion')"):c=15
  print('Count',c)
  try:
   for i in range(c,20+c):
    print('No:',i,c+1)
    if c==15 :break
    for j in range(4):
     _="document.getElementsByClassName('jquery-adi light')"
     self.b.execute_script("if ({0}.length){0}[0].remove()".format(_))
     fl=self.b.execute_script('return document.forms.length')
     try:
      c=int(self.b.execute_script("return document.querySelector('.question_div span').innerText.split(' ')[0]"))
     except:c=c
     if not fl:
      if 'amulyam' not in self.b.current_url:return
      um='Captcha'
      print(um)
      sleep(3)
      _=self.b.execute_script("if({0}.length) return {0}[0].children[0].href; else return 0".format("document.getElementsByClassName('trivia_ans_options')",random.randrange(5)))
      if(_):self.b.get(_)     
 
     else:
      fl=self.b.execute_script('return document.forms[0].elements.length')
      if fl==2:
       mx='ShowWord'
       print(mx)
       _="document.querySelector('.question_div p')";
       self.b.execute_script("if ({0})sessionStorage.w={0}.innerText".format(_))
       self.lsl()
      elif fl==3 and self.b.execute_script('return document.forms[0].elements[0].tagName')!="TEXTAREA":
       mx='EnterWord'
       print(mx)
       self.b.execute_script("document.querySelector('#submit-word').value=sessionStorage.w;")
       self.lsl()
      elif fl==3:
       mx='Recaptcha'
       print(mx)
       for i in range(10):
        if self.cv() :break
        print('cving')
       self.lsl()    
    
   if self.b.execute_script("return document.querySelectorAll('.amu_add_new a')"):
    cw = self.b.current_window_handle
    self.b.execute_script("for (a of document.querySelectorAll('.amu_add_new a'))a.click()")
    sleep(3)
    self.b.switch_to_window(self.b.window_handles[1]);self.lsl(0);self.b.close();sleep(1)
    self.b.switch_to_window(self.b.window_handles[1]);self.lsl(0);self.b.close();sleep(1)
    self.b.switch_to_window(cw)
    self.lsl()
 
  except Exception as e:
   self.fexc(e)
 
 
 def ad(self):
  _="document.getElementsByClassName('jquery-adi light')[0]"
  self.b.execute_script("if ({0}){0}.remove()".format(_))
 def cwh(self):
  self.b.switch_to_window(self.b.window_handles[-1])


 def fexc(self,e,j=0):
  global m_
  exc_type, exc_obj, exc_tb = sys.exc_info()
  tb = traceback.extract_tb(exc_tb)[-1]
  print('{}\n{} {}'.format(e,tb[2],tb[1]))
  traceback.print_exc()
  print(self.i)
  m_='Won'

 def a(self):
  global m_,bx
  try:
   
    t1 = time.time()
    self.login(self.i)
    self.loginc()
    self.trivia() 
    self.voc()

    t2 = time.time()
    print("Elapsed time:", secondsToStr( t2-t1 ))
    if(m_=='Done'):self.b.get('http://www.amulyam.in/credit-history.do')
    _=(confirm( text=m_, title='Smart', buttons=['OK','Cancel']))
    if _=='OK':self.b.get('http://www.amulyam.in/logout.do')
  except KeyboardInterrupt as e:
   print(e)

 def __repr__(self):
  self.a()
  return ''
 
n=8 
m_='Done'


def secondsToStr(t):
    rediv = lambda ll,b : list(divmod(ll[0],b)) + ll[1:]
    return "%d:%02d:%02d.%03d" % tuple(reduce(rediv,[[t*1000,],1000,60,60]))




from selenium import webdriver
class SessionRemote(webdriver.Remote):
    def start_session(self, desired_capabilities, browser_profile=None):
        # Skip the NEW_SESSION command issued by the original driver
        # and set only some required attributes
        self.w3c = True

   
   



url = 'http://127.0.0.1:51454'
b = SessionRemote(command_executor=url,desired_capabilities={})
b.session_id="2ae2694dc4001f092fe624739c767f6e"
 
 



i1=Amu(0,b)
i1.login(0)
i1.trivia()

Auto Amulyam - TM

Amulyam
// ==UserScript==
// @name         Amulyam All
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://www.amulyam.in/*
// @grant        none
// ==/UserScript==
function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) {
        return;
    }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css.replace(/;/g, ' !important;');
    head.appendChild(style);
}
window.addEventListener('load', function() {
    if (!sessionStorage) {
        document.querySelector('.mfp-bg.mfp-ready').remove()
        document.querySelector('[class="mfp-wrap mfp-close-btn-in mfp-auto-cursor mfp-ready"]').remove()
    }
    var a = document.getElementsByClassName('jquery-adi light');
    if (a.length) a[0].remove();
    sessionStorage.a++;
    addGlobalStyle('.jquery-adi light {display:none; }');
    console.log('ADI Removed');
    var a = document.getElementsByClassName('jquery-adi light');
    if (a.length) a[0].remove();
    sessionStorage.a++;
}, false);

function eventFire(el, etype) {
    if (el.fireEvent) {
        el.fireEvent('on' + etype);
    } else {
        var evObj = document.createEvent('Events');
        evObj.initEvent(etype, true, false);
        el.dispatchEvent(evObj);
    }
}
(function() {
    'use strict';
    var a = window.location.href;
    var aa = window.location.href.split('?')[0];
    var _;
    _ = document.getElementById('dialog');
    if (_) _.outerHTML = '';
    _ = document.getElementById('mask');
    if (_) _.outerHTML = '';
    $(".trivia_ans_options").show()
    var sel = false;
    var adi = document.getElementsByClassName('jquery-adi light')[0];
    if (adi) adi.remove();
    if (sel) a = aa = '';
    console.log(a,aa);
    if (aa == 'http://www.amulyam.in/daily-login-credits.do') {;
    } else if (aa == 'http://www.amulyam.in/vocabulary.do' ||
               aa == 'http://www.amulyam.in/playTrivia.do' ||
               aa == 'http://www.amulyam.in/checkTriviaLinkCaptcha.do' ||
               aa == 'http://www.amulyam.in/checkVocabularyLinkCaptcha.do') {
        console.log('Else');
        _ = document.querySelector('.question_div p');
        if (_ || 1) {
            localStorage.a = _.innerText;
            document.forms[0].submit();
        }
    } else if (aa == 'http://www.amulyam.in/checkTriviaCaptcha.do' || aa == 'http://www.amulyam.in/checkVocabularyCaptcha.do') {} else if (a == 'http://www.amulyam.in/enterLWord.do') {
        console.log('Else 2');
        document.querySelector('#submit-word').value = localStorage.a;
        document.forms[0].submit();
    } else if (a == 'http://www.amulyam.in/showLWord.do' || a == 'http://www.amulyam.in/checkTrivia.do') {
        console.log('Else 3');
        if (document.forms[0]) {
            document.forms[0].word.value=localStorage.a;
            document.forms[0].submit();
        } else {
            document.querySelector('.amu_trivia_content_part').scrollIntoView();
//             document.getElementsByClassName('trivia_ans_options')[0].children[0].click();
        }
    }
    else{
        console.log('FallBack');
    }
    // Your code here...
})();

Recharge Ur Mobile With UR Luck


Lucky Recharge offers free prepaid mobile recharge on all operators across India. The recharge value varies between Rs.10 to Rs.100 based on the last 3 to 7 digits of your mobile number. Just enter your mobile number and check your luck for the day