# -*- coding: utf-8 -*-

import requests
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from BeautifulSoup import BeautifulSoup 

class HttpProcessor(BaseHTTPRequestHandler):
	def do_GET(self):
		req = requests.get("http://h...content-available-to-author-only...r.ru%s" % self.path)

		self.send_response(req.status_code)
		self.send_header('content-type',req.headers['content-type'])
		self.end_headers()
		self.wfile.write(self.retranslate_page(req.text.encode('utf-8')))

	def retranslate_page(self, page):
		soup = BeautifulSoup(page)
		div_content = soup.findAll("div", {"class": "content html_format"}) 
		""" 
		тут (div_content) твой ебучий контент, куда надо вуяривать тм'ки
		может разобрать его с помощью того же soup, а можешь
		ебаться в жёпу с бомжами, мне все равно
		"""
		return page # заглушка, отдает страницу как есть, без тм'ок

serv = HTTPServer(("localhost", 80), HttpProcessor)
serv.serve_forever()