diff --git a/README.md b/README.md index 1c5f734..4a695f0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # AmritaQPapers -This Python code lets you have a look at the Institutional Repository for previous year question papers, without actually having to go to the website and surf. -PS : Only for Amritians :P -You can find its .exe file here : https://drive.google.com/open?id=1M5xe1IRNF1C0P9LOC5Me7bIUmF1SOwuo +This is a PC version of Amrita Repository App, coded in Python 3. It helps you download previous year question papers in a much easier way. + +[![Download AmritaQPapers](https://a.fsdn.com/con/app/sf-download-button)](https://sourceforge.net/projects/amritaqpapers/files/latest/download) diff --git a/SemPapers.py b/SemPapers.py index 220b9cc..871da32 100644 --- a/SemPapers.py +++ b/SemPapers.py @@ -14,7 +14,8 @@ def year(url): try: page = requests.get(url) soup = BeautifulSoup(page.content,'html.parser') - base_url=url + + div=soup.findAll('div', xmlns="http://di.tamu.edu/DRI/1.0/") ul=div[0].findAll('ul') li=ul[0].findAll('li') @@ -45,15 +46,13 @@ def year(url): except: print("UNEXPECTED ERROR! :(") exit() - print("\nBROWSER IS OPENING! PLEASE BE PATIENT :) ") + print("Please wait till the browser opens ! ") webbrowser.open(url, new=0, autoraise=True) - ch=int(input('\nDo you want to continue ? \nPress 1 for Yes and 0 for No : ')) + ch=int(input('Do you want to continue ? \nPress 1 for Yes and 0 for No : ')) if(ch==0): - print("\nThanks for using. Wish you ALL THE BEST for your exams :)") - sleep(3) exit() else: - year(base_url) + start()