<s> from base import BaseHandler <EOL> import feedparser <EOL> import tornado . web <EOL> from logic import content_remote <EOL> feedparser . _HTMLSanitizer . acceptable_elements = feedparser . _HTMLSanitizer . acceptable_elements + [ '<STR_LIT>' ] <EOL> class PushHandler ( BaseHandler ) : <EOL> def get ( self ) : <EOL> self . write ( self . get_argument ( '<STR_LIT>' ) ) <EOL> def check_xsrf_cookie ( self ) : <EOL> pass <EOL> def post ( self ) : <EOL> user = self . models . users . get ( username = self . breadcrumbs [ "<STR_LIT>" ] ) [ <NUM_LIT:0> ] <EOL> if not user : <EOL> return <EOL> feed_doc = feedparser . parse ( self . request . body ) <EOL> profile_url = feed_doc . feed [ '<STR_LIT>' ] <EOL> remote_user = self . models . users_remote . get ( local_username = user . username , <EOL> profile_url = profile_url ) [ <NUM_LIT:0> ] <EOL> if not remote_user : <EOL> return <EOL> content_remote . parse_feed ( self . models , remote_user , <EOL> parsed_feed = self . request . body , <EOL> max_days_old = self . constants [ '<STR_LIT>' ] ) </s>
