8000 Remove South Korean BRN online check · unho/python-stdnum@0779d6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 0779d6a

Browse files
committed
Remove South Korean BRN online check
The Korea Fair Trade Commission website now requires solving a CAPTCHA before submitting the request so this is no longer possible.
1 parent 61ebc9c commit 0779d6a

File tree

2 files changed

+0
-60
lines changed

2 files changed

+0
-60
lines changed

stdnum/kr/brn.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,3 @@ def format(number):
8484
"""Reformat the number to the standard presentation format."""
8585
number = compact(number)
8686
return '-'.join([number[:3], number[3:5], number[5:]])
87-
88-
89-
def check_ftc(number, timeout=30): # pragma: no cover
90-
"""Check the number against the Korea Fair Trade Commission website."""
91-
import lxml.html
92-
import requests
93-
number = compact(number)
94-
url = 'https://www.ftc.go.kr/bizCommPop.do'
95-
document = lxml.html.fromstring(
96-
requests.get(url, params={'wrkr_no': number}, timeout=timeout).text)
97-
data = dict(zip(
98-
[(x.text or '').strip() for x in document.findall('.//th')],
99-
[(x.text or '').strip() for x in document.findall('.//td')]))
100-
return data or None

tests/test_kr_brn.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0