NBAPB (Blog Auto Posting Bot)
-
데모영상
설치, 셋팅
-
설치
$ pip install bpb
-
네이버 계정 설정
file:
config.json{ "NAVER_ID": "", "NAVER_PASSWORD": "" }
-
chromedriver 설치
chromedriver는 크롬 버전에 맞춰 설치
구동
-
CLI 모드
bpb -a [계정정보 json 파일] -f [마크다운 파일 경로] -w [웹 드라이버 파일 경로] -r [-f 인자로 전달한 파일에서 사용하는 리소스 파일 경로] start
경로는
절대경로입력 권장합니다.마크다운에서 사용하는 리소스(이미지)는 상대경로로 경로를 표현할 수 있으므로 마크다운에서 사용되는 이미지 파일을 따로 디렉터리로 관리하여
-r옵션으로 전달bpb -a ./config.json -f ./data/test2.md -w ./driver/chromedriver -r ./data/ start
계정정보 ./config.json
마크다운 파일경로 ./data/test2.md
웹드라이버파일경로 .driver/chromedriver
마크다운에서 사용하는 리소스 파일 경로 ./data/
bpb -a /Users/bagjeongtae/Desktop/markdown_to_convert/config.json -f /Users/bagjeongtae/Desktop/markdown_to_convert/data/test1.md -w /Users/bagjeongtae/Desktop/markdown_to_convert/driver/chromedriver -r /Users/bagjeongtae/Desktop/markdown_to_convert/data/ start
-
Code
from bpb.lib.controller import Controller if __name__ == "__main__": account_set_path = '/Users/bagjeongtae/Desktop/blog_post_bot_cli/config.json' web_driver = '/Users/bagjeongtae/Desktop/blog_post_bot_cli/driver/chromedriver' resource_dir = '/Users/bagjeongtae/Desktop/blog_post_bot_cli/data/' target = '/Users/bagjeongtae/Desktop/blog_post_bot_cli/data/test.md' controller = Controller(target, account_set_path,web_driver, resource_dir, debug=True) controller()
issue
-
실행환경
mac에서만 테스트함.
-
이미지 경로문제
윈도우의 경우 다음과 같이 경로를 작성
 -
비동기처리
코드에서 실행할 경우 비동기로 처리하도록 한다.
Metadata
Release files for bpb 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bpb-1.2-py3-none-any.whl | Python 3 | none | any | Details for bpb-1.2-py3-none-any.whl |
Release files / bpb-1.2-py3-none-any.whl
| Download URL | bpb-1.2-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a359c12d69ec5c85227243e78fe7a4d3886fea48bf072787d3b177a99594a414
|
|
BLAKE2b-256 checksum How to use checksums |
39657d7201d00fa35fb120219cc205cc621f17feccbbce1970195e5b3b86860b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5
|
Security for bpb 1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.