import csv
import urllib.request
import requests
from bs4 import BeautifulSoup
session = requests.Session()
res = session.get('http://url.com')
cookies = dict(res.cookies)
url = 'http://url.com'
params = {
'login':'login',
'pass':'pass'
}
r = session.post(url, data = params, cookies = cookies)
print(r.text)