{"id":20225133,"url":"https://github.com/antony-jr/coepy","last_synced_at":"2026-06-12T09:32:04.962Z","repository":{"id":91206109,"uuid":"153984417","full_name":"antony-jr/CoePy","owner":"antony-jr","description":"A Powerful CLI Tool to automatically scrape information from Controller Of Examination AU written in Python :snake:.","archived":false,"fork":false,"pushed_at":"2019-01-28T05:25:15.000Z","size":1521,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-03T12:45:23.960Z","etag":null,"topics":["anna-university","automation","capcha-solver","coe-anna-university-scraper","python-cli","python3","scraper"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antony-jr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-21T07:38:38.000Z","updated_at":"2022-11-30T03:36:15.000Z","dependencies_parsed_at":"2023-03-05T03:45:44.216Z","dependency_job_id":null,"html_url":"https://github.com/antony-jr/CoePy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/antony-jr/CoePy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony-jr%2FCoePy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony-jr%2FCoePy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony-jr%2FCoePy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony-jr%2FCoePy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antony-jr","download_url":"https://codeload.github.com/antony-jr/CoePy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antony-jr%2FCoePy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34238713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anna-university","automation","capcha-solver","coe-anna-university-scraper","python-cli","python3","scraper"],"created_at":"2024-11-14T07:11:10.350Z","updated_at":"2026-06-12T09:32:04.938Z","avatar_url":"https://github.com/antony-jr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoePy [![GitHub issues](https://img.shields.io/github/issues/antony-jr/CoePy.svg?style=flat-square)](https://github.com/antony-jr/CoePy/issues) [![GitHub forks](https://img.shields.io/github/forks/antony-jr/CoePy.svg?style=flat-square)](https://github.com/antony-jr/CoePy/network) [![GitHub stars](https://img.shields.io/github/stars/antony-jr/CoePy.svg?style=flat-square)](https://github.com/antony-jr/CoePy/stargazers) [![GitHub license](https://img.shields.io/github/license/antony-jr/CoePy.svg?style=flat-square)](https://github.com/antony-jr/CoePy/blob/master/LICENSE)\n\nThis is a simple and powerful CLI tool written in python which can automate student information extraction from AU , and\neventually makes our lives better.\nThis script simply uses **selenium to enter form feilds** , the interesting part is that this script **automatically solves the\ncaptcha generated by COE AU Website.**\nThus saves a lot of time , This can also help you if you want to check marks in **bulk** , Just execute this script , drink\nyour coffee and wait for the script to show your requested information.\n\n**IMPORTANT** : Only tested the login process , Which is quite good. But Still cannot test the scraping of information since\nthe website is not responding to anyone , neither humans nor bots.\n\n**NOTE**: Only tested on linux , may or may not work in other platforms.\n\n# Installation\n\nI did not publish this in pypi(Python Package Index) since the code will be updated frequently , and cannot release it a gazillion times ,And also **this project can be discontinued anytime.** \n\nTherefore you have to install it manually from source , Don't worry it will be easy. Before you do anything , Make sure you have **google chrome** or **chromium** installed in your computer. (Which will be used by this script to render the website since it\ndepends so much on a real browser , I will be honest , the website is very cranky when scraped with requests)\n\nNow execute the following commands in your terminal ,\n```\n $ git clone https://github.com/antony-jr/CoePy\n $ cd CoePy\n $ sudo pip3 install -r requirements.txt\n $ ./coepy.py --help\n```\n\n**Note** : This script is only tested on **Python 3.7**.\n\n# Cracking Captcha\n\nThe most interesting part of this project is cracking the captcha generated by the website , Thats the biggest hurdle\nin automating this process , right ?\nSo here is how I cracked it.\n\nSo first lets take a look at captcha's generated by COE AU Website ,\n\u003cp align=center\u003e\n \u003cimg src=\"CaptchaSamples/CaptchaSample0.png\" height=40 width=140/\u003e\n \u003cimg src=\"CaptchaSamples/CaptchaSample1.png\" height=40 width=140/\u003e\n\u003c/p\u003e\n\n**Note** : On observing a sample of 1500 captcha's generated by COE AU Website , the captcha seems to only follow the above two patterns.\n\nBy Observations ,   \n**The Static Properties of Captcha's generated by COE AU Website are,**   \n\n* Resolution of any arbitary captcha is always **70x20 Pixels (can be taken as 70x20 Matrix)**.\n* Any arbitary captcha is always **binary** , (i.e) It will always use only black and white colours.\n* Only uses **numericals 0-9** and **alphabets A-Z**\n* Has very few noise.\n* Any arbitary captcha has **6 characters inscribed in it**.\n* A Single character can be fitted inside a **10x8 Matrix**.\n\nNow lets do some math ,   \nLet **'R'** be a matrix of a arbitary captcha image which is in **binary**.(i.e White Pixel is 255 and Black Pixel is 0) ,   \nNow from the **static properties** we know that **'R' must be a 70x20 Matrix** , like so...   \n\u003cp align=center\u003e\n \u003cimg src=\"math/r.png\" width=auto height=auto /\u003e\n \u003c/p\u003e\n \nLet **'C\u003csub\u003en\u003c/sub\u003e'** be a matrix that represents a single character from the captcha , Where **'n'** represents the **n**th\ncharacter from the captcha , Thus the range of **'n'** must be **0 \u003c= n \u003c Number of Characters in the Captcha**.\nNow from the **static properties** we know that **'C\u003csub\u003en\u003c/sub\u003e' must be a 10x8 Matrix** , like so... \n\u003cp align=center\u003e\n \u003cimg src=\"math/cn.png\" width=auto height=auto /\u003e\n\u003c/p\u003e\n\nLet **T\u003csub\u003e0\u003c/sub\u003e T\u003csub\u003e1\u003c/sub\u003e T\u003csub\u003e2\u003c/sub\u003e ... T\u003csub\u003e35\u003c/sub\u003e** be a set of matrix which is of **order 10x8** , Let this set be the **test set**., These matrices are obtained from coverting all possible characters in the captcha's generated by COE AU Website to a matrix which\nhas the character in white pixels and background in black pixels , These characters are un-noised and filtered from all\nsamples. From the **static properties we know that the maximum number of characters is 36.**\nNow these matrices are stored for later use.\n\nNow each matrix in the set {**C\u003csub\u003e0\u003c/sub\u003e C\u003csub\u003e1\u003c/sub\u003e C\u003csub\u003e2\u003c/sub\u003e ... C\u003csub\u003e5\u003c/sub\u003e**} is compared againts each element in the **test set**. The **Percentage of Match** is calculated between a single character(**C\u003csub\u003en\u003c/sub\u003e**) in the arbitary captcha and all the characters in the **test set** , The element in **test set** with the highest **Percentage of Match** is the most appropriate character in the position **n** of the **resultant string** which must have a length of **6**(Since the captcha has only 6 characters inscribed in it).\n\n**T\u003csub\u003e0\u003c/sub\u003e** corresponds to the character **'0'** , **T\u003csub\u003e1\u003c/sub\u003e** corresponds to the character **'1'** , and \nthus **T\u003csub\u003em\u003c/sub\u003e** corresponds to the character in chronological order in the list of all possible characters **'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'**.\n\nThe **Percentage of Match** is calculated like so... ,\n\u003cp align=center\u003e\n \u003cimg src=\"math/pom.png\" width=auto height=auto /\u003e\n\u003c/p\u003e\n\n**Therefore The most appropriate character for nth character in the resultant string is obtained  , This process is repeated upto n=6(Since the maximum character inscribed in the captcha is six). Thus the resultant string is obtained.**\n\n\nTo see this in action , You can use the **coepy-cpt.py** script which is used to test the **captcha parser** ,\n```\n $ cd CoePy\n $ pip3 install -r requirements.txt # Install the dependencies.\n $ python coepy-cpt.py CaptchaSamples/CaptchaSample0.png # The first captcha \n $ python coepy-cpt.py CaptchaSamples/CaptchaSample1.png # The second captcha\n```\n\n\u003cp align=center\u003e\n\u003cimg src=\"captcha_cracking_preview.gif\" width=auto height=auto /\u003e\n\u003c/p\u003e\n\n\n\nStill this can get us wrong results sometimes , but we can just re-try , We just need the most likely answers.\n\n# License\n\nThe MIT License.   \nCopyright (C) 2018 [Antony Jr.](https://github.com/antony-jr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony-jr%2Fcoepy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantony-jr%2Fcoepy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantony-jr%2Fcoepy/lists"}