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

날짜 지정 기능 추가 (Add Date Assignment feature) #26

Merged
merged 9 commits into from
Mar 27, 2022
Merged

날짜 지정 기능 추가 (Add Date Assignment feature) #26

merged 9 commits into from
Mar 27, 2022

Conversation

geun9716
Copy link
Contributor

@geun9716 geun9716 commented Mar 23, 2022

하루 하루 크롤링 하는 기능의 필요성이 있어 날짜가 지정 가능한 기능을 추가하였습니다.
기존의 input과 다르게 YYYY-MM-DD 의 str 형식으로 입력을 바꿨습니다.
만약 2017-12 부터 2018-02를 지정하는 경우 자동으로 2017-12-01 부터 2018-01-31 까지 할당하도록 하였습니다.
기능 확인 후에 이상 없으면 merge 부탁드립니다.
좋은 하루 되세요 :)

(ps. 따로 README.md 의 대한 수정은 merge 후의 적용하는 것으로 알고 포함하지 않았습니다.)

There is a need for a function to crawl day by day, I have added a function that allows you assign date in this code
Input has been changed like 'YYYY-MM-DD' as string type
If you assign '2017-12' to '2018-02', Automatically It is assigned '2017-12-01' to '2018-01-31'
Please merge then if you can't find any problem in this code
Have a nice day :)

from korea_news_crawler.articlecrawler import ArticleCrawler
if __name__ == "__main__":
    Crawler = ArticleCrawler()
    # 정치, 경제, 생활문화, IT과학, 사회, 세계 카테고리 사용 가능
    Crawler.set_category("IT과학", "세계")
    # 2017년 12월 (1일) 부터 2018년 1월 13일까지 크롤링 시작 YYYY-MM-DD의 형식으로 입력
    Crawler.set_date_range('2017-12', '2018-01-13')
    Crawler.start()

@lumyjuwon
Copy link
Owner

좋습니다👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants