Помогите с авторизацией в облаке Nexcloud
Код возвращает
В чем ошибка ?
Код:
import requests
from bs4 import BeautifulSoup
from colorama import Fore, Back, Style
from random import choice
from progress.bar import Bar
url = 'http://user7877.royal-hosting.ru/nextcloud/index.php/login'
url_next = 'http://user7877.royal-hosting.ru/nextcloud/index.php/login?user=art&direct=1&redirect_url=/nextcloud/index.php/apps/files/?dir=/&fileid=207'
url_out = 'http://user7877.royal-hosting.ru/nextcloud/index.php'
headers = {'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36'}
s = requests.Session()
req = s.post(url, data={'user':'art', 'password':'ArtArtArtArt'}, headers=headers)
next = s.get(url_next, headers=headers)
s.cookies
soup = BeautifulSoup(req.text, "html.parser")
print (soup)
Код возвращает
Код:
{"message":"Current user is not logged in"}
В чем ошибка ?