Skip to content

Instantly share code, notes, and snippets.

@lARSHADl

lARSHADl/Scraper Secret

Created March 28, 2021 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lARSHADl/ddcd0f4a6cd0a6b43ccd2949d567cf1d to your computer and use it in GitHub Desktop.
Save lARSHADl/ddcd0f4a6cd0a6b43ccd2949d567cf1d to your computer and use it in GitHub Desktop.
python code for jntuh
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
link = 'http://results.jntuh.ac.in/jsp/SearchResult.jsp?degree=btech&examCode=1442&etype=r17&type=intgrade'
hallticket = "17801A0521"
dobval = '1998-03-01'
with webdriver.Chrome() as Resultbrowser:
Resultbrowser.get(link)
Hallfield = Resultbrowser.find_element_by_name("htno")
Hallfield.send_keys(hallticket)
Hallfield.send_keys(Keys.RETURN)
dob = Resultbrowser.find_element_by_class_name('hasDatepicker')
dob.send_keys(dobval)
dob.send_keys(Keys.RETURN)
dob.send_keys(Keys.TAB)
time.sleep(2)
Resultbrowser.execute_script("""
document.querySelector("#txtInput").value = document.querySelector("#txtCaptcha").value
""")
time.sleep(5)
Resultbrowser.execute_script("""document.getElementById("myForm").onsubmit();""")
time.sleep(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment