[파이썬]티스토리 오픈API이용
# Script/Python2022. 10. 14. 11:17[파이썬]티스토리 오픈API이용

카테고리확인 import requests import json access_token = "Access Token 값" def getAccessToken(): url = "https://www.tistory.com/oauth/access_token?" client_id = "[앱 관리] - APP ID" client_secret = "[앱 관리] - Secret Key" code = "2번에서 허가하기를 눌러 받은 code 값" redirect_uri = "[앱 관리]에서 설정한 값" grant_type="authorization_code" # authorization_code 고정 data = url data += "client_id="+client_id+"&" data += "client_secret..

티스토리 오픈API 발급 및 인증코드 발급
# Life/IT2022. 10. 14. 10:11티스토리 오픈API 발급 및 인증코드 발급

API 승인 코드발급 발급경로 OpenAPI - TISTORY TISTORY 나를 표현하는 블로그를 만들어보세요. www.tistory.com 인증요청URI https://www.tistory.com/oauth/authorize? client_id=abcdefghijklmnopqrstuvwxyz &redirect_uri=http://client.redirect.uri &response_type=code &state=someValue 인증이 완료되면 아래와 같이 리다이렉트 됨 http://client.redirect.uri?code=authorizationCode&state=someValue 토큰발급 GET https://www.tistory.com/oauth/access_token? client_id={..

[파이썬]워드프레스 자동포스팅
# Script/Python2022. 10. 13. 19:06[파이썬]워드프레스 자동포스팅

from wordpress_xmlrpc import Client from wordpress_xmlrpc import WordPressPost from wordpress_xmlrpc.methods import posts wp = Client('http://워드프레스 주소/xmlrpc.php', '아이디', '비밀번호') post = WordPressPost() post.title = 'My new title' post.content = 'This is the body of my new post.' post.terms_names = { 'post_tag': ['test', 'firstpost'], 'category': ['Introductions', 'Tests'] } post.post_status = "p..

php 7.4.32 컴파일 설치
# Script/PHP2022. 10. 12. 16:38php 7.4.32 컴파일 설치

configure [darksharavim.tistory.com]./configure --prefix=/apps/php7 \ --disable-debug \ --enable-sockets \ --enable-sysvsem=yes \ --enable-sysvshm=yes \ --enable-ftp \ --enable-gd \ --enable-inline-optimization \ --enable-bcmath \ --enable-exif \ --enable-sigchild \ --enable-mbstring \ --enable-fpm \ --enable-mysqlnd \ --enable-soap \ --with-curl \ --with-zlib \ --with-gettext \ --with-jpeg \ --..

[파이썬]페이지 로딩될 때 까지 기다리게 하는 방법
# Script/Python2022. 10. 12. 13:19[파이썬]페이지 로딩될 때 까지 기다리게 하는 방법

Selenium이 페이지가 모두 로딩될 때 까지 기다리게 하는 방법 단순 시간 대기 from time import sleep URL = 'http://encykorea.aks.ac.kr/Contents/CategoryNavi?category=contenttype&keyword=%EC%9D%B8%EB%AC%BC&ridx=0&tot=18507' # 원하는 페이지 지정 driver = webdriver.Chrome('chromedriver.exe') # 원하는 브라우저 엔진 선택(파일 경로) driver.get(URL) # 해당 URL로 브라우저 창을 실행 sleep(3) 브라우저 엔진이 URL을 접속하고 단순히 3초를 대기한다. 이 방법은 모든 페이지마다 항상 3초를 대기하므로 비효율적이다. 암묵적 대기(I..

image