Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib
- from http import cookiejar
- def main():
- cookie = cookiejar.CookieJar()
- req = urllib.request.build_opener(
- urllib.request.HTTPCookieProcessor(cookie))
- urllib.request.install_opener(req)
- par = urllib.parse.urlencode({
- 'nick':'evilmanul',
- 'passwd':'my_password'}).encode('utf-8') # параметры
- resp = req.open('https://linux.org.ru', par)
- print(resp.read().decode("utf-8"))
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement