forked from riyaa14/SheBuilds_BotProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unstopHackathons.py
24 lines (19 loc) · 717 Bytes
/
unstopHackathons.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
url = 'https://unstop.com/hackathons?filters=open&types=oppstatus'
driver = webdriver.Chrome()
driver.maximize_window() # For maximizing window
driver.implicitly_wait(10) # gives an implicit wait for 20 seconds
driver.get(url)
Challenge = driver.find_element(By.CLASS_NAME, 'cptn')
heading = Challenge.find_element(By.TAG_NAME, 'h2').text
org = Challenge.find_element(By.TAG_NAME, 'h3').text
link = driver.find_element(By.CLASS_NAME, 'listing').get_attribute('href')
print(heading)
print(org)
print(link)
##### for database ######
# 1. heading
# 2. org
# 3. link