educationboardresults

import urllib2 import os from bottle import get, post, request, run, Bottle application = app = Bottle() def get_result(exam, year, board, roll): base_url = "http://www.educationboardresults.gov.bd/regular" #switch to archive.educationboard.gov.bd if this fails index_response = urllib2.urlopen(base_url + "/index.php") session_var = index_response.info().headers[3].split()[1][0:36] #getting PHPSESSID session cookie post_data = "sr=3&et=0&exam=%s&year=%s&board=%s&roll=%s&button2=Submit" % (exam, year, board, roll) result_request = urllib2.Request(base_url + "/result.php", headers = {'Cookie': session_var}) result_response = urllib2.urlopen(result_request, post_data) return result_response.read() @app.route('/') def index_page(): # just the info entry page, don't validate HTML, please! return '''Board Result Fetcher

Board Result Fetcher

Exam:
Year:
Roll:
Board:

''' @app.route('/check', method="POST") def result(): roll = request.forms.get("roll") board = request.forms.get("board") exam = request.forms.get("exam") year = request.forms.get("year") result = get_result(exam, year, board, roll) if result == "Error: QDTL65656565": return '''

Result Database Tables not found

The board site is having issues with their database, probably they have not yet uploaded and propagated the database tables for this years examinees, please keep patience and try a few minutes later.
''' else: return result if __name__ == '__main__': run(app, host='0.0.0.0', port=80)

0 Comments