Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import request
- import bs4
- import lxml
- def get_answer():
- ''' Function for getting count of vowels in url and posts answer '''
- # in this block we're getting the raw text
- r = requests.get('https://ctf.zsis.hr/login?username=####&password=#####')
- soup = bs4.BeautifulSoup(r.text, 'lxml')
- rawtext = soup.find_all('pre')
- # we have to strip rawtext before we loop through it
- answer = 0
- for sym in rawtext:
- if sym in 'aeyoui':
- answer += 1
- return answer
- # this is line with posted answer
- requests.post('https://ctf.zsis.hr/', answer)
- get_answer()
- # 72-5432
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement