Created
August 10, 2017 14:27
-
-
Save arijitx/f5031949add441bec95b48fd171eeb7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
url ="http://moodle.iitb.ac.in/mod/forum/discuss.php?d=62595" | |
s=requests.session() | |
r = s.post("http://moodle.iitb.ac.in/login/index.php", data={'username':'roll_no','password':'pass'}) | |
r2 = s.get(url) | |
count=0 | |
ind=0 | |
while(1): | |
ind=r2.text.find("+1",ind+1) | |
if ind==-1: | |
break | |
count+=1 | |
print count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment