Commit Diff


commit - /dev/null
commit + fb3c63beea23960f42f6eb32976899722bfc81be
blob - /dev/null
blob + 797f4587ce175b4cb3b97be15697251a90671ef2 (mode 644)
--- /dev/null
+++ avk.py
@@ -0,0 +1,36 @@
+from http.cookiejar import CookieJar, Cookie
+from urllib.request import build_opener, HTTPCookieProcessor
+
+
+cookiejar = CookieJar()
+opener = build_opener(HTTPCookieProcessor(cookiejar))
+with opener.open("https://m.vk.com/rtpbooks") as response:
+    pass
+
+
+cookie_tmpl = next(iter(cookiejar))
+cookiejar.set_cookie(
+    Cookie(
+        cookie_tmpl.version, 
+        "remixmdevice",
+        "1920/1080/1/!",
+        cookie_tmpl.port,
+        cookie_tmpl.port_specified,
+        cookie_tmpl.domain,
+        cookie_tmpl.domain_specified,
+        cookie_tmpl.domain_initial_dot,
+        cookie_tmpl.path,
+        cookie_tmpl.path_specified,
+        cookie_tmpl.secure,
+        cookie_tmpl.expires,
+        cookie_tmpl.discard,
+        cookie_tmpl.comment,
+        cookie_tmpl.comment_url,
+        cookie_tmpl._rest,
+        rfc2109=cookie_tmpl.rfc2109,
+    )
+)
+
+
+with opener.open("https://m.vk.com/rtpbooks") as response:
+    print(response.read().decode("utf8"))