def search(self): if self.driver.title == "The Only Matrimony Site in the World with 100% Verified Mobile Numbers": skip_to_home = self.driver.find_element_by_xpath("//html/body/div[1]/div[1]/div[4]/a") skip_to_home.click() nav_bar_search_div = self.driver.find_element_by_id("overbg2") nav_bar_search_div.find_element_by_xpath("./a[2]").click() search_div = self.driver.find_element_by_id("div_search") search_div.find_element_by_xpath("./div[2]/a[1]").click() time.sleep(10) print "Trying to find dyn_pages" profiles_div = self.driver.find_element_by_id("dyn_pages") i = 1 dal = BMDAL() while True: print 'loop counter = ' + str(i) div_path = "./div[@id=\"res_pg_" + str(i) + "\"]/div[@class=\"srhlist-bg width774 pntr\"]" print div_path profile_divs = profiles_div.find_elements_by_xpath(div_path) for profile_div in profile_divs: profile_url = profile_div.find_element_by_xpath('./div/div[1]/div[1]/div[1]/a') dal.insert_id(profile_url.text) print 'done with page ' + str(i) pagination_div = self.driver.find_element_by_id('pagination') print 'Found pagination div, moving on to the next page' + pagination_div.text if i == 1: pagination_div.find_element_by_xpath('./li[6]/a').click() else: pagination_div.find_element_by_xpath('./li[7]/a').click() i = i + 1 print "done with this loop. sleeping for 5" time.sleep(5)
def save(self): dal = BMDAL(); params = {} params["country"] = self.country params["state"] = self.state params["city"] = self.city params["resident_status"] = self.resident_status params["citizenship"] = self.citizenship return dal.insert_location_info(params)
def save(self): dal = BMDAL() params = {} params["country"] = self.country params["state"] = self.state params["city"] = self.city params["resident_status"] = self.resident_status params["citizenship"] = self.citizenship return dal.insert_location_info(params)
def save(self): dal = BMDAL() params = {} params["education"] = self.education params["occupation"] = self.occupation params["education_in_detail"] = self.education_in_detail params["occupation_in_detail"] = self.occupation_in_detail params["employed_in"] = self["employed_in"] params["annual_income"] = self["annual_income"] return dal.insert_professional_information(params)
def save(self): dal = BMDAL(); params = {} params["religion"] = self.religion params["caste"] = self.caste params["subcaste"] = self.subcaste params["gothram"] = self.gothram params["star"] = self.star params["kuja_dosham"] = self.kuja_dosham return dal.insert_religion_info(params)
def save(self): dal = BMDAL() params = {} params["religion"] = self.religion params["caste"] = self.caste params["subcaste"] = self.subcaste params["gothram"] = self.gothram params["star"] = self.star params["kuja_dosham"] = self.kuja_dosham return dal.insert_religion_info(params)
def save(self): dal = BMDAL(); params = {} params["hobbies"] = self.hobbies params["interests"] = self.interests params["favorite_cuisine"] = self.favorite_cuisine params["favorite_music"] = self.favorite_music params["preferred_dress_style"] = self.preferred_dress_style params["preferred_movies"] = self.preferred_movies params["spoken_languages"] = self.spoken_languages return dal.insert_hobby_info(params)
def save(self): dal = BMDAL() params = {} params["hobbies"] = self.hobbies params["interests"] = self.interests params["favorite_cuisine"] = self.favorite_cuisine params["favorite_music"] = self.favorite_music params["preferred_dress_style"] = self.preferred_dress_style params["preferred_movies"] = self.preferred_movies params["spoken_languages"] = self.spoken_languages return dal.insert_hobby_info(params)
def save(self): dal = BMDAL() params = {} params["family_values"] = self.family_values params["family_type"] = self.family_type params["family_status"] = self.family_status params["ancestral_origin"] = self.ancestral_origin params["fathers_occupation"] = self.fathers_occupation params["mothers_occupation"] = self.mothers_occupation params["number_of_sisters"] = self.number_of_sisters params["number_of_brothers"] = self.number_of_brothers params["about_our_family"] = self.about_our_family return dal.insert_family_info(params)
def save(self): dal = BMDAL() params = {} params["groom_age"] = self.groom_age params["height"] = self.height params["marital_status"] = self.marital_status params["mother_tongue"] = self.mother_tongue params["physical_status"] = self.physical_status params["eating_habits"] = self.eating_habits params["smoking_habits"] = self.smoking_habits params["drinking_habits"] = self.drinking_habits params["looking_for"] = self.looking_for params["religion_info_id"] = self.religion_info.save() params["location_info_id"] = self.location_info.save() params["professional_info_id"] = self.professional_info.save() return dal.insert_partner_preference(params)
def save(self): dal = BMDAL() params = {} params["religion_info_id"] = self.religion_info.save() params["location_info_id"] = self.location_info.save() params["professional_info_id"] = self.professional_info.save() params["family_info_id"] = self.family_info.save() params["hobby_info_id"] = self.hobby_info.save() params["partner_preference_id"] = self.partner_preference.save() params["name"] = self.name params["age"] = self.age params["height"] = self.height params["mother_tongue"] = self.mother_tongue params["eating_habits"] = self.eating_habits params["smoking_habits"] = self.smoking_habits params["complexion"] = self.complexion params["physical_status"] = self.physical_status params["weight"] = self.weight params["marital_status"] = self.marital_status params["drinking_habits"] = self.drinking_habits return dal.insert_profile(params)