0

I have looked up other questions which have kind of a similar issue but none of them are working for me. I am working on Python 3.

I have been trying to get the contact info and Email Id of a college through this website: https://www.collegesearch.in/colleges/dronacharya-group-of-institutions-greater-noida/contact#contactDiv

This site allows you to extract these details only after you login. Without logging into the website, it just displays text: 'View Contact No.', 'View Email'. I logged into the website through Python but it is still giving me the these texts instead of displaying the Contact No. and the Email ID.

Here is my code:

import requests
params = {'student_email':'mayankrox22@gmail.com', student_password':'############'}
r = requests.post('https://www.collegesearch.in/student-login#/processing.php', params)
s = r.cookies.get_dict()
r = requests.get('https://www.collegesearch.in/colleges/dronacharya-group-of-institutions-greater-noida/contact#contactDiv/processing.php', cookies = s)
print(r.text)
Mayank Jindal
  • 35
  • 2
  • 7
  • duplicate [How to scrape a website that requires login first with Python][1] [How to scrape a website which requires login using python and beautifulsoup?][2] [1]: https://stackoverflow.com/questions/20039643/how-to-scrape-a-website-that-requires-login-first-with-python [2]: https://stackoverflow.com/questions/23102833/how-to-scrape-a-website-which-requires-login-using-python-and-beautifulsoup – j4rey Jul 19 '17 at 07:29
  • The mechanize and cookielib don't work in Python 3 – Mayank Jindal Jul 21 '17 at 04:00

0 Answers0