コード例 #1
0
 def get_current_assets_loans_advances(self, tree):
     current_assets_loans_advances1 = trying(
         tree, '/html/body/div[2]/div[5]/table/tbody/tr[20]/td[2]/text()')
     current_assets_loans_advances2 = trying(
         tree, '/html/body/div[2]/div[5]/table/tbody/tr[20]/td[3]/text()')
     return get_correct_ratio(current_assets_loans_advances1,
                              current_assets_loans_advances2)
コード例 #2
0
 def get_current_assets_loans_advances(self, tree):
     current_assets_loans_advances1 = trying(
         tree, '//*[@id="leftcontainer"]/table/tbody/tr[20]/td[2]')
     current_assets_loans_advances2 = trying(
         tree, '/html/body/div[2]/div[5]/table/tbody/tr[20]/td[3]')
     return get_correct_ratio(current_assets_loans_advances1,
                              current_assets_loans_advances2)
コード例 #3
0
 def get_present_year_dividend_present_year_dividend_per_share_minus2(
     self, tree
 ):
     p3 = trying(
         tree, '//*[@id="leftcontainer"]/table/tbody/tr[6]/td[4]'
     )
     return p3
コード例 #4
0
 def _get_correct_ratio(self, tree, x_path_first_part, x_path_sec_part):
     ratio_not_found = True
     i = 8
     while ratio_not_found == True and i > 0:
         x_path = x_path_first_part + str(i) + x_path_sec_part
         ratio = trying(tree, x_path)
         if ratio != 0.00:
             ratio_not_found = False
         i = i - 1
     return ratio
コード例 #5
0
 def _get_correct_ratio(self, tree, x_path_first_part, x_path_sec_part):
     ratio_not_found = True
     i = 8
     while ratio_not_found == True and i > 0:
         x_path = x_path_first_part + str(i) + x_path_sec_part
         ratio = trying(tree, x_path)
         if ratio != 0.00:
             ratio_not_found = False
         i = i - 1
     return ratio
コード例 #6
0
 def get_price_of_stock(self, tree):
     return trying(tree, '//*[@id="ltpid"]/text()')
コード例 #7
0
 def get_present_year_dividend_present_year_dividend_per_share(self, tree):
     return trying(tree, '/html/body/div[2]/div[5]/table/tbody/tr[6]/td[2]/text()')
コード例 #8
0
 def get_price_of_stock(self, tree):
     pos = trying(tree, '//*[@id="ltpid"]')
     return pos
コード例 #9
0
 def get_total_net_current_assets(self, tree):
     return trying(tree, '/html/body/div[2]/div[5]/table/tbody/tr[22]/td[2]/text()')
コード例 #10
0
 def get_total_net_current_assets(self, tree):
     return trying(
         tree, '/html/body/div[2]/div[5]/table/tbody/tr[22]/td[2]/text()')
コード例 #11
0
 def get_current_liabilities_and_provisions(self, tree):
     current_liabilities_and_provisions = trying(
         tree, '/html/body/div[2]/div[5]/table/tbody/tr[21]/td[2]/text()')
     return current_liabilities_and_provisions
コード例 #12
0
 def get_price_of_stock(self, tree):
     return trying(tree, '//*[@id="ltpid"]/text()')
コード例 #13
0
 def get_pe_ratio(self, tree):
     pe_ratio = trying(tree, '//*[@id="div_rcard_more"]/div[1]/div[2]')
     return pe_ratio
コード例 #14
0
 def get_present_year_dividend_present_year_dividend_per_share(self, tree):
     return trying(
         tree, '/html/body/div[2]/div[5]/table/tbody/tr[6]/td[2]/text()')
コード例 #15
0
 def get_current_liabilities_and_provisions(self, tree):
     current_liabilities_and_provisions = trying(
         tree, '//*[@id="leftcontainer"]/table/tbody/tr[21]/td[2]')
     return current_liabilities_and_provisions
コード例 #16
0
 def get_current_liabilities_and_provisions(self, tree):
     current_liabilities_and_provisions = trying(tree, '/html/body/div[2]/div[5]/table/tbody/tr[21]/td[2]/text()')
     return current_liabilities_and_provisions
コード例 #17
0
 def get_total_net_current_assets(self, tree):
     return trying(tree, '//*[@id="leftcontainer"]/table/tbody/tr[22]/td[2]'
                   #'/html/body/div[2]/div[5]/table/tbody/tr[22]/td[2]'
                   )
コード例 #18
0
 def get_current_assets_loans_advances(self, tree):
     current_assets_loans_advances1 = trying(tree, '/html/body/div[2]/div[5]/table/tbody/tr[20]/td[2]/text()')
     current_assets_loans_advances2 = trying(tree, '/html/body/div[2]/div[5]/table/tbody/tr[20]/td[3]/text()')
     return get_correct_ratio(current_assets_loans_advances1, current_assets_loans_advances2)
コード例 #19
0
 def get_eps(self, tree):
     eps = trying(tree, '//*[@id="div_rcard_more"]/div[2]/div[2]')
     return eps