Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import requests
  4.  
  5. main22 = "https://moodlearn.ariel.ac.il/course/view.php?lang=en&id="
  6.  
  7. def checksite(a):
  8. r = requests.get(main22 + str(a))
  9. if "Guests cannot" not in r.text and "More information about this error" not in r.text and "unavailable to students" not in r.text:
  10. print(a)
  11. with open("Opencourses.txt","a") as myfile:
  12. myfile.write(str(a) + "\n")
  13.  
  14.  
  15. for i in range(50000,100000):
  16. if i%100 == 0:
  17. print("passed "+str(i));
  18. checksite(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement