Commit 5db491d1 authored by BooDonky's avatar BooDonky
Browse files

Web Project Init

parent a440f2f4
name;values;domain
oo;v1;.facebook.com
xs;91%3AYElG58o-B-AUsg%3A2%3A1637155946%3A-1%3A12803;.facebook.com
c_user;100001000000000;.facebook.com
spin;r.1004745222_b.trunk_t.1637155952_s.1_v.2_;.facebook.com
wd;929x879;.facebook.com
sb;TwSVYW79AHhBOL-F5-BJMoNI;.facebook.com
datr;RASVYWNDN6_wPVJe64nsKPiq;.facebook.com
name;value;domain;
oo;v1;.facebook.com;
xs;91%3AYElG58o-B-AUsg%3A2%3A1637155946%3A-1%3A12803;.facebook.com;
c_user;1.00001E+14;.facebook.com;
spin;r.1004745222_b.trunk_t.1637155952_s.1_v.2_;.facebook.com;
wd;929x879;.facebook.com;
sb;TwSVYW79AHhBOL-F5-BJMoNI;.facebook.com;
datr;RASVYWNDN6_wPVJe64nsKPiq;.facebook.com;
from selenium import webdriver
from csv import DictReader
#from tools.web_function_tools import get_cookies_values,cookie_adder
url = "https://www.facebook.com"
csv = "facebook_cookies.csv"
driver = webdriver.Chrome()
driver.get(url)
def get_cookies_values(file):
with open(file, encoding="utf-8-sig") as f:
dict_reader = DictReader(f)
list_of_dicts = list(dict_reader)
return list_of_dicts
cookies = get_cookies_values(csv)
print(cookies)
for i in cookies:
driver.add_cookie(i)
driver.refresh()
from csv import DictReader
def get_cookies_values(file):
with open(file, encoding="utf-8-sig") as f:
dict_reader = DictReader(f)
list_of_dicts = list(dict_reader)
return list_of_dicts
def cookie_adder(d,cookies):
for i in cookies:
d.add_cookie(i)
d.refresh()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment