diff --git a/crawler.py b/crawler.py new file mode 100644 index 0000000..3a64903 --- /dev/null +++ b/crawler.py @@ -0,0 +1,17 @@ +# +# Use Requests to make the crawling of information from the websites. +# +import Requests + +class Crawler: + + def __init__(self): + self.url = 'http://www.carris.com.br' + self.url_eptc = 'http://www.eptc.com.br/EPTC_Itinerarios/Linha.asp?cdEmp=3' + + def get_url(self, url) + r = requests.get(self.url) + if r.status_code() == requests.codes.ok: + print r.json() + else: + print "check the url"