def mark_search(self):
        le_trademarkName = self.le_trademarkName.text()
        # applicationDate_le = self.applicationDate_le.text()
        le_similarityCode = self.le_similarityCode.text()

        self.textBrowser_searched.clear()

        query = {
            "trademarkName": le_trademarkName,
            "classification": "",
            "asignProduct": "",
            "applicationNumber": "",
            "registerNumber": "",
            "publicationNumber": "",
            "registrationPublicNumber": "",
            "internationalRegisterNumber": "",
            "priorityNumber": "",
            # "applicationDate": applicationDate_le,
            "registerDate": "",
            "publicationDate": "",
            "registrationPublicDate": "",
            "priorityDate": "",
            "internationalRegisterDate": "",
            "applicantName": "",
            "agentName": "",
            "viennaCode": "",
            "regPrivilegeName": "",
            "freeSearch": "",
            "similarityCode": le_similarityCode,
            "application": "true",
            "registration": "true",
            "refused": "true",
            "expiration": "true",
            "withdrawal": "true",
            "publication": "true",
            "cancel": "true",
            "abandonment": "true",
            "trademark": "true",
            "serviceMark": "true",
            "trademarkServiceMark": "true",
            "businessEmblem": "true",
            "collectiveMark": "true",
            "internationalMark": "true",
            "character": "true",
            "figure": "true",
            "compositionCharacter": "true",
            "figureComposition": "true",
            "numOfRows": "20",
            "pageNo": "1"
        }
        soup = getInfoFromApi.getAdvancedSearch(query)
        items = soup.select("item")
        i = 1
        for item in items:
            applicationnumber = item.select_one("applicationnumber").text
            title = item.select_one("title").text
            self.textBrowser_searched.append(str(i) + '번: ')
            self.textBrowser_searched.append('상표명: ' + title)
            self.textBrowser_searched.append('출원번호: ' + applicationnumber)
            i+=1
Esempio n. 2
0
    "withdrawal" : "true",
    "publication" : "true",
    "cancel" : "true",
    "abandonment" : "true",
    "trademark" : "true",
    "serviceMark" : "true",
    "trademarkServiceMark" : "true",
    "businessEmblem" : "true",
    "collectiveMark" : "true",
    "internationalMark" : "true",
    "character" : "true",
    "figure" : "true",
    "compositionCharacter" : "true",
    "figureComposition" : "true",
    "numOfRows" : "20",
    "pageNo" : "1"
}
soup = getInfoFromApi.getAdvancedSearch(query)

# 출원번호맟 모아서, 지정상품 정보를 api를 통해서 받고, 지정상품:유사군코드 딕셔너리 생성
appNums = get_appNum(soup)
code_goods_output = {}
for appNum in appNums:
    # 출원번호의 지정상품 정보
    soup = getInfoFromApi.trademarkDesignationGoodstInfo({"applicationNumber": appNum.text})
    goods_code_for_one_appNum = goods_code_dict(soup)
    code_goods_output.update(goods_code_for_one_appNum)

# 유사군코드별 상품들로 바꿔줌
code_Goods_Dict = code_goods_dict(code_goods_output)
print(code_Goods_Dict)
Esempio n. 3
0
    def get_goods_list(self):
        le_asignProduct = self.le_asignProduct.text()

        self.tb_code_goods.clear()

        # {지정상품 : 유사군코드}_ 지정상품-유사군코드 dict 만들기
        def goods_code_dict(soup):
            list = soup.select("trademarkdesignationgoodstinfo")
            good_code_dict = {}
            for k in list:
                good_code_dict[k.select_one("designationgoodshangeulname").
                               text] = k.select_one("similargroupcode").text
            return good_code_dict

        # {유사군코드 : {지정상품1, 지정상품2}}_유사군코드별-지정상품들의 dict 만들기
        def code_goods_dict(dict):
            code_goods_dict = {}
            for k, v in dict.items():
                code_goods_dict.setdefault(v, set()).add(k)
            return code_goods_dict

        # 출원번호의 리스트를 뽑아서 리턴
        def get_appNum(soup):
            return soup.select("applicationnumber")

        # 상품명에 대한 쿼리 및 api를 통해서 정로를 받음
        query = {
            "asignProduct": le_asignProduct,
            "applicationDate": "20191201~20200223",
            "application": "true",
            "registration": "true",
            "refused": "true",
            "expiration": "true",
            "withdrawal": "true",
            "publication": "true",
            "cancel": "true",
            "abandonment": "true",
            "trademark": "true",
            "serviceMark": "true",
            "trademarkServiceMark": "true",
            "businessEmblem": "true",
            "collectiveMark": "true",
            "internationalMark": "true",
            "character": "true",
            "figure": "true",
            "compositionCharacter": "true",
            "figureComposition": "true",
            "numOfRows": "20",
            "pageNo": "1"
        }
        soup = getInfoFromApi.getAdvancedSearch(query)

        # 출원번호를 모아서, 지정상품 정보를 api를 통해서 받고, 지정상품:유사군코드 딕셔너리 생성
        appNums = get_appNum(soup)
        code_Goods_Dict = {}
        code_goods_output = {}
        for appNum in appNums:
            # 출원번호의 지정상품 정보
            soup = getInfoFromApi.trademarkDesignationGoodstInfo(
                {"applicationNumber": appNum.text})
            goods_code_for_one_appNum = goods_code_dict(soup)
            code_goods_output.update(goods_code_for_one_appNum)

        # 유사군코드별 상품들로 바꿔줌
        code_Goods_Dict = code_goods_dict(code_goods_output)
        for k in code_Goods_Dict:
            self.tb_code_goods.append(str(k))
            self.tb_code_goods.append(str(code_Goods_Dict[k]))