-
Notifications
You must be signed in to change notification settings - Fork 0
/
default_handler.py
31 lines (30 loc) · 990 Bytes
/
default_handler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import webapp2, logging
from constants import LEGACY_FEED_URL
from database import FeedSource
class DefaultHandler(webapp2.RequestHandler):
def get(self):
host = 'https://frequentfeedscraper.appspot.com'
self.response.write( \
"""<!doctype html>
<html>
<title>Frequest Feed Scraper</title>
<style>
body
{
font: normal 1em Arial;
}
</style>
</head>
<body>
<h1>Frequent Feed Scraper</h1>
For getting (hopefully) all of the <a href="%s">Chromium Code Review</a> entries.<br/><br/>
Usage - add <a href="/read?feed=codereviews">%s/read?feed=codereviews</a> to your feed reader.<br/><br/><br/>
You can fork using <a href="https://github.com/phistuck/FrequentFeedScraper/">Git(Hub)</a>.<br/>
Available feeds -<br/>""" % (LEGACY_FEED_URL, host))
for source in FeedSource.all():
url = '/read?feed=' + source.name
self.response.write('<a href="' + url + '">' + host + url + '</a><br/>')
self.response.write( \
"""
</body>
</html>""")