(OS 독립적) Go 유틸리티로 데이터(예: 토픽 게시물) 가져오기

'discourse-reader’는 사용자를 대신하여 Discourse 포럼에서 데이터(예: 사이트, 카테고리, 토픽)를 가져옵니다. 이 유틸리티는 다음에서 찾을 수 있습니다:

discourse-reader                                                                       

Program:
  Name    : discourse-reader
  Release : v1.0.0 - 2022/11/18
  Purpose : Discourse Reader
  Info    : Discourse 포럼에서 데이터(예: 사이트, 카테고리, 토픽)를 가져옵니다.

Usage:
  discourse-reader -forum=string -query=string -category=int -topic=int -pages=int -output=string -userapikey -sleeptime=int

Examples for general query:
  discourse-reader
  discourse-reader -query=community.openstreetmap.org/site.json -output=community.openstreetmap.org.json
  discourse-reader -query=community.openstreetmap.org/site.json -output=community.openstreetmap.org.json -userapikey=bd38603815e3f2562c3eb3988c69eb77
  discourse-reader -query=meta.discourse.org/site.json -output=meta.discourse.org.json
  discourse-reader -query=meta.discourse.org/session/current.json -output=session-current.json

Examples for category:
  discourse-reader -forum=community.openstreetmap.org -category=56 -output=category-56.json
  discourse-reader -forum=community.openstreetmap.org -category=56 -output=category-56.json -userapikey=bd38603815e3f2562c3eb3988c69eb77
  discourse-reader -forum=meta.discourse.org -category=67 -pages=99 -sleeptime=6 -output=category-67.json

Examples for topic:
  discourse-reader -forum=community.openstreetmap.org -topic=4120 -output=topic-4120.json
  discourse-reader -forum=community.openstreetmap.org -topic=4120 -pages=99 -sleeptime=6 -output=topic-4120.json
  discourse-reader -forum=community.openstreetmap.org -topic=4120 --output=topic-4120.json -userapikey=bd38603815e3f2562c3eb3988c69eb77
  discourse-reader -forum=meta.discourse.org -topic=112837 -output=topic-112837.json

Options:
  -category int
    	해당 식별자를 가진 카테고리의 데이터(토픽 목록)를 가져옵니다 (기본값 -1)
  -forum string
    	Discourse 포럼 URL
  -output string
    	JSON 출력 파일 이름
  -pages int
    	가져올 데이터의 페이지 수 (기본값 19)
  -query string
    	일반 데이터 조회 쿼리 (완전한 URL)
  -sleeptime int
    	다음 페이지를 가져오기 전 대기 시간(초) (사용자 속도 제한을 방지합니다) (기본값 2)
  -topic int
    	해당 식별자를 가진 토픽의 데이터(게시물 목록)를 가져옵니다 (기본값 -1)
  -userapikey string
    	개인 사용자 API 키 (환경 변수 'USER_API_KEY'로 설정할 수도 있습니다)

Remarks:
  - 사용자 API 키는 환경 변수 [USER_API_KEY]로 설정할 수 있습니다.
  - 인터넷 프록시는 환경 변수 [HTTPS_PROXY]로 설정할 수 있습니다.
  - Linux 예시:
    export USER_API_KEY=bd38603815e3f2562c3eb3988c69eb77
    export HTTPS_PROXY=http://user:password@194.114.63.23:8080
  - Windows 예시:
    set USER_API_KEY=bd38603815e3f2562c3eb3988c69eb77
    set HTTPS_PROXY=http://user:password@194.114.63.23:8080

Rate limiting by forum service:
  - 이 프로그램은 브라우저로 접속하는 사용자와 기능적으로 차이가 없습니다. 그러나 데이터는 다소 빠르게 가져와집니다. 이로 인해 서비스 측에서 거부(속도 제한)가 발생할 수 있습니다. 이를 방지하기 위해 프로그램은 페이지를 가져오는 사이에 일시 정지할 수 있습니다. 일시 정지 시간은 '-sleeptime=int' 옵션으로 지정할 수 있습니다.
  - 일반적인 사용자 속도 제한 설정은 다음과 같습니다:
    - 분당 요청 수 : 20
    - 일일 요청 수    : 2880
1개의 좋아요