Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Exception] [0] 해당 의안 정보가 존재하지 않습니다. #38

Open
hunkim opened this issue Dec 3, 2015 · 5 comments
Open

Comments

@hunkim
Copy link
Contributor

hunkim commented Dec 3, 2015

일부 법안에 대해 다음과 같은 에러가 나는데. CSV목록에는 있는데 법안 detail은 정보가 없다고 나옵니다.

http://likms.assembly.go.kr/bill/jsp/BillDetail.jsp?bill_id=PRC_E1O4I0W4F2D5L1G0D3S6M3N5V3X3Q4

image

이런경우 현재 html2json에서는 IndexError exception을 내는데 따로 처리 해주는 것이 좋지 않을까요?

Traceback (most recent call last):
  File "safe.py", line 68, in safe_get_parse_page
    safe_parse_page(assembly_id, bill_id, metacsv);
  File "safe.py", line 40, in safe_parse_page
    specific.parse_page(assembly_id, bill_id, meta, jsondir);
  File "/home/ubuntu/crawlers/bills/specific/html2json.py", line 242, in parse_page
    d = extract_specifics(assembly_id, bill_id, meta)
  File "/home/ubuntu/crawlers/bills/specific/html2json.py", line 166, in extract_specifics
    table       = utils.get_elems(page, X['spec_table'])[1]
IndexError: list index out of range

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28805653-exception-0?utm_campaign=plugin&utm_content=tracker%2F248104&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F248104&utm_medium=issues&utm_source=github).
@hunkim
Copy link
Contributor Author

hunkim commented Dec 3, 2015

혹시 CSV를 만들때 link를 잘못가져올 가능성도 있는지 모르겠습니다.

한 예로 bill_id: 1907716
link_id: PRC_L1Y3E1E1Q1F2O1P8Z2C5N4H9T1E5I9

의안 시스템에서 bill_id로도 검색이 가능한가요?

@mithrandir
Copy link

http://likms.assembly.go.kr/bill/jsp/BillDetail.jsp?bill_id=PRC_E1O4I0W4F2D5L1G0D3S6M3N5V3X3Q4
에 해당하는 의안번호를 찾아보니 1910298 번입니다.
http://ko.pokr.kr/bill/1910298

1910298번은
http://likms.assembly.go.kr/bill/jsp/BillDetail.jsp?bill_id=PRC_L1L4I0L4D2V5A1K8O0H6L4R9Z3U5C3

동일한 발의인의 의안은 1910299호
http://likms.assembly.go.kr/bill/jsp/BillDetail.jsp?bill_id=PRC_Z1L4L0V4S2O5N1O0B5V6F2V4Q4M5L7

동일한 제안내용의 법안은 아직 못찾았습니다. 위 내용을 보건데 csv가 잘못 crawling 된것으로 보입니다.

내용으로 보건데 1900491호가 비슷해보입니다.

@mithrandir
Copy link

웹에서 뒤지다 보니 의안번호로 검색할 수 있는 시스템을 찾았습니다.
https://www.lawmaking.go.kr/opnPtcp/nsmLmSts/out

@mithrandir
Copy link

국회의안정보시스템
2016-01-01 2 54 44
https://raw.githubusercontent.com/teampopong/data-assembly/b332e929f4ada0f2e04a90d8fc926a1a26657fa8/bills.csv 파일중.
2016-01-01 2 55 00

해당 항목 주위는 정상적으로 보입니다. 크롤러 버그인지 국회사이트 버그인지는 모르겠습니다. 로컬에서 csv생성해보는 중입니다.

@mithrandir
Copy link

로컬에서 크롤링한 19.csv 를 확인해보았습니다.
2016-01-01 3 10 03

1910298 번이 공직자 윤리법항목으로 정상적으로 크롤링 되었습니다. 잘 보면 뒤쪽 항목이 업데이트 된 걸 알 수 있습니다. github에 올라가있는 파일과 달라보입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants