Jump to content

valkyrion123

Members
  • Posts

    7
  • Joined

  • Last visited

valkyrion123's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. i dont think my code is not working, cause it working in my xampp on my pc btw here is the code maybe i make a mistake on declare shebang or something #!/usr/bin/python import sys import time import cgi, cgitb sys.path.append('/selenium') from selenium import webdriver print "Content-type: text/html" print "" # Create instance of FieldStorage form = cgi.FieldStorage() # Get data from fields nisn = form.getvalue('nisn') driver = webdriver.PhantomJS("./phantomjs-linux/bin/phantomjs") url = "http://nisn.data.kemdikbud.go.id/page/data" driver.get(url) #filling form sbox = driver.find_element_by_name("ctl00$contentCenter$edNISN") sbox.send_keys(nisn) driver.find_element_by_id("ctl00_contentCenter_RadButton1_input").click() time.sleep(2) nama = str(driver.find_element_by_id("contentCenter_lRes1Nama").text) sex = str(driver.find_element_by_id("contentCenter_lRes1Kelamin").text) lahir = str(driver.find_element_by_id("contentCenter_lRes1Tmptlahir").text) tanggal = str(driver.find_element_by_id("contentCenter_lRes1TglLahir").text) #print json_dumps(res,separators=(',', ': ')) print nama + "," + sex + "," + lahir + "," + tanggal driver.quit() edit: btw, did johnny support python 2.7.1? because in that 500 error it says Python/2.4.3
  2. no, still error 500. i've paste your code and name it time.pl set permission to 755 and still get same error edit: its worked, there is .htaccess and i remove it but the problem still with my script. my script is .py actually
  3. aw that is unfortunate to hear that there is a problem, when it will be fixed? @Byron, yes i set it to 755 even the folder itself show at 755 and still it show the error above. maybe i just need it to be fixed Thank you for the answer
  4. I uploaded my cgi script to scgi-bin in public_html folder, but when i want to access it via url it return error like this scgiwrap: Caller must be the nobody user I also tried to upload in cgi-bin folder, but instead error above i got 500 internal server error is there any solution? Thank you
  5. well my python script do web scraping with form input handling and i don't know how to do that in PHP, also i got another one for image recognition and python is easier also faster and that is why i keep using this script. but since you said python can be made into POST request, i think i can learn one.. Thanks for your help
  6. hmm since my scripts is only triggered by some action and also need an input for it, with that method, how did i pass the input to the script? thanks
  7. As the title say i want to run a python script that called using exec command in PHP for example $id = '4552763663200002'; $command = 'C:\Python27\python.exe simple.py '. $id; exec($command, $string); but how to do this on heliohost server? can someone help me? Thank you
×
×
  • Create New...