Created
November 23, 2017 09:49
-
-
Save hemangsk/ef604e5d82dd8212d21f7f6f6a7a131b 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
# coding: utf-8 | |
# In[1]: | |
import requests | |
# In[4]: | |
r = requests.get('https://enquiry.indianrail.gov.in/xyzabc/LiveStation?stnCode=DLI&toStnCode=&withinHrs=2&trainType=ALL&scrnSize=s&langFile=props.en-us') | |
r.text | |
# In[5]: | |
r | |
# In[6]: | |
r.headers | |
# In[7]: | |
r.text | |
# In[35]: | |
from bs4 import BeautifulSoup | |
# In[36]: | |
soup = BeautifulSoup(r.text, "html5lib") | |
# In[38]: | |
soup.find_all('table', {'class': 'allTrainsViaStn'}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment