Skip to main content

Naver Blog Auto Posting Bot From Read Markdown File

Project description

NBAPB (Blog Auto Posting Bot)

설치, 셋팅

  • 설치

    $ pip install bpb
    
  • 네이버 계정 설정

    file: config.json

    {
      "NAVER_ID": "",
      "NAVER_PASSWORD": ""
    }
    
  • chromedriver 설치

    chromedriver download

    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에서만 테스트함.

  • 이미지 경로문제

    윈도우의 경우 다음과 같이 경로를 작성

    ![](C:\\Users\\user\\Desktop\\blog_post_bot_cli\\data\\img.png)
    
  • 비동기처리

    코드에서 실행할 경우 비동기로 처리하도록 한다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bpb-1.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file bpb-1.2-py3-none-any.whl.

File metadata

  • Download URL: bpb-1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for bpb-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a359c12d69ec5c85227243e78fe7a4d3886fea48bf072787d3b177a99594a414
MD5 99fd9b0c305360d182a0480100607081
BLAKE2b-256 39657d7201d00fa35fb120219cc205cc621f17feccbbce1970195e5b3b86860b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page