Skip to content

Instantly share code, notes, and snippets.

@m0pfin
Last active October 8, 2020 22:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m0pfin/a9e9d1f10a8e49bcc8c304005ec39cd3 to your computer and use it in GitHub Desktop.
Save m0pfin/a9e9d1f10a8e49bcc8c304005ec39cd3 to your computer and use it in GitHub Desktop.
Mass import cookies to INDIGO/MultiLoginApp
import requests
# Задаём порядковый номер для создания профиля
i = 0
def p(i):
return i+1
with open('profile_id.txt', 'r') as f:
for line in f:
line = line.strip()
profile_id = line
print('ID профиля: %s' % (profile_id))
i = p(i)
#f = open('cookies'+str(i)+'.txt')
f = open(str(i)+'.txt')
print(f)
cook = f.read()
#print(cook)
url = "http://127.0.0.1:35000/api/v1/profile/cookies/import/netscape?profileId="+profile_id
payload = cook
headers = {
'Content-Type': 'text/plain'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment