Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ridzuan05 committed Apr 2, 2015
1 parent 8d7c271 commit d991629
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scraper.py
Expand Up @@ -8,16 +8,16 @@

# Change QUERY to your search term of choice.
# Examples: 'newsnight', 'from:bbcnewsnight', 'to:bbcnewsnight'
QUERY = 'LLMinfotrafik'
RESULTS_PER_PAGE = '100'
QUERY = 'from:LLMinfotrafik'
RESULTS_PER_PAGE = '10'
# LANGUAGE = 'en'
LANGUAGE = 'en'
NUM_PAGES = 10

for page in range(1, NUM_PAGES+1):
# base_url = 'http://search.twitter.com/search.json?q=%s&rpp=%s&lang=%s&page=%s' \
# % (urllib2.quote(QUERY), RESULTS_PER_PAGE, LANGUAGE, page)
base_url = 'http://search.twitter.com/search.json?q=from%3ALLMinfotrafik'
base_url = 'http://search.twitter.com/search.json?q=%s&rpp=%s&lang=%s&page=%s' \
% (urllib2.quote(QUERY), RESULTS_PER_PAGE, LANGUAGE, page)
# base_url = 'http://search.twitter.com/search.json?q=from%3ALLMinfotrafik'
try:
results_json = simplejson.loads(scraperwiki.scrape(base_url))
for result in results_json['results']:
Expand Down

0 comments on commit d991629

Please sign in to comment.