Commit Diff


commit - 38a989cbfcbadccc35a22dd44b2d34fe7d253a40
commit + a09679db1c40a458d14b7b63035b9806ef6aea42
blob - d88ba135a02b04f994d67703ccb4f194096ffa9d
blob + 08a5ef91d8f7484c3050e6c4822dbf14da6b26c4
--- avk.py
+++ avk.py
@@ -335,17 +335,13 @@ class _HTTPRequestHandler(BaseHTTPRequestHandler):
         _response_fn()
 
     def _do_GET(self):
-        _, _, path, _, qs, _ = urlparse(self.path)
+        _, _, _, _, qs, _ = urlparse(self.path)
         query = parse_qs(qs) if qs else {}
-        if path == "/robots.txt":
-            return self._return_robots_txt
-
-        if path == "/":
-            name = query.get("name", [None])[0]
-            if name:
-                base_url = urlunparse(("https", "m.vk.com", name, "", "", ""))
-                xml_tree = _HTMLParser(base_url).feed(_get_html(base_url)).build_xml_tree(self.path)
-                return lambda: self._return_xml(xml_tree)
+        name = query.get("name", [None])[0]
+        if name:
+            base_url = urlunparse(("https", "m.vk.com", name, "", "", ""))
+            xml_tree = _HTMLParser(base_url).feed(_get_html(base_url)).build_xml_tree(self.path)
+            return lambda: self._return_xml(xml_tree)
 
         return self._return_not_found