I am working on a Swift app that sign in to my school website. In Python, the code bellow work well, but i stuck at finding equivalent for Swift.
Please help me find equivalent for BeautifulSoup's Find function in Swift. Thank you so much.
s = requests.Session()
try:
r = s.get('url')
r = BS(r.content, 'html5lib')
sso_token = (r.find('input', {'name': 'lt'})).attrs['value']
data = {'username': username,
'password': password,
'lt': sso_token,
'execution': 'e1s1',
'_eventId': 'submit',
'submit': 'Login'}
r = s.post('url', data=data)