예제 #1
0
    def c_mortgage_execute(self, id, click_id):
        if self.qyxx_mortgage_basic:

            data = {
                'method': 'dcdyDetail',
                'maent.pripid': id,
                'maent.xh': click_id,
                'random': str(int(time.time() * 1000))
            }

            resp = url_requests.post(url=self.url,
                                     data=data,
                                     headers=self.headers)

            soup = BeautifulSoup(resp.content, 'lxml')

            if soup:
                self.mortgage_soup = soup
                soups = soup.find_all('table', {'class': 'detailsList'})

                for each_soup in soups:
                    if '动产抵押登记信息' in each_soup.text:
                        info = self.parse(pageSoup=each_soup)
                        if info:
                            self.mortgage_reg_num = info[0]['登记编号']
                            info[0] = common.c_mortgage_dict(info[0])
                            self.qyxx_c_mortgage.extend(info)
                        break
예제 #2
0
 def c_mortgage_execute(self, dlink, pageSoup):
     br_keyword = [u"动产抵押登记信息"]
     dict_ba = common.get_dict(pageSoup, br_keyword, class_="detailsList")
     dict_ba = common.c_mortgage_dict(dict_ba)
     dict_ba_list = []
     dict_ba_list.append(dict_ba)
     return dict_ba_list
예제 #3
0
 def c_mortgage_execute(self, pageSoup):
     table = pageSoup.find_all('table', class_='detailsList')
     for each_table in table:
         if '动产抵押登记信息' in each_table.text:
             info = self.parse(each_table)
             if info != []:
                 self.mortgage_reg_num = info[0]['登记编号']
                 info[0] = common.c_mortgage_dict(info[0])
                 self.qyxx_c_mortgage.extend(info)
             break
예제 #4
0
 def c_mortgage_execute(self, pageSoup):
     tables = pageSoup.find('div', class_='detail-info')
     tables = tables.find_all('table')
     info = []
     for each in tables:
         if '动产抵押登记信息' in each.find('tr').text:
             info = self.parse(each)
             if info != []:
                 self.mortgage_reg_num = info[0]['登记编号']
             break
     info[0] = common.c_mortgage_dict(info[0])
     self.qyxx_c_mortgage.extend(info)
예제 #5
0
    def c_mortgage_execute(self, mortgage_soup):
        soup = mortgage_soup.find_all('div',
                                      {'style': 'width:800px;height:600px;'})

        for each_soup in soup:
            if '动产抵押登记信息' in each_soup.text:

                info = self.parse(each_soup)
                if info != []:
                    self.mortgage_reg_num = info[0]['登记编号']

                    info[0] = common.c_mortgage_dict(info[0])

                    self.qyxx_c_mortgage.extend(info)
                break
예제 #6
0
    def c_mortgage_execute(self, mortgage_soup):

        soup = mortgage_soup.find_all('div', {'class': 'content2'})

        for each_soup in soup:
            if '动产抵押登记信息' in each_soup.text:

                info = self.parse(each_soup)
                if info != []:
                    self.mortgage_reg_num = info[0]['登记编号']

                    info[0] = common.c_mortgage_dict(info[0])

                    self.qyxx_c_mortgage.extend(info)
                break
예제 #7
0
    def c_mortgage_execute(self, **kwargs):
        """只有mortgage_basic这个表有数据,才会执行下面三个附属表。"""
        soup = kwargs.get('mortSoup')
        table_tag = soup.find_all('div')
        for each in table_tag:
            if '动产抵押登记信息' in each.text:
                table = each.next_sibling.next_sibling
                keys = table.find_all('td', class_='tdTitleText')
                info = {}
                for each_key in keys:
                    key = each_key.text.strip()
                    value = each_key.next_sibling.next_sibling.text.strip()
                    info[key] = value

                info = common.c_mortgage_dict(info)
                self.mortgage_reg_num = info['mortgage_reg_num']
                self.qyxx_c_mortgage.append(info)
                break