Skip to content

Commit

Permalink
Create crawler.py
Browse files Browse the repository at this point in the history
Tarara
  • Loading branch information
filipecifali committed Jan 10, 2013
1 parent a865b69 commit 07acde4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crawler.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 07acde4

Please sign in to comment.