Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
naver-blog-backer๋ ๋ค์ด๋ฒ ๋ธ๋ก๊ทธ๋ฅผ ๋ฐฑ์ (ํฌ๋กค๋ง)๊ณผ ๋ฐฑ๋งํฌ ๋ API๋ฅผ ์ ๊ณตํ๋ ํจํค์ง์ ๋๋ค.
โป ์ผ๋ฐ ์ฌ์ฉ์๋ถ๋ค๊ป์๋ ํด๋น ํด๋ ๋ด์ ์์นํ 'naverblogbacker.exe'ํ์ผ์ ๋ค์ด ๋ฐ์ผ์๋ฉด ๋ฉ๋๋ค.
๋ณธ๋ ์์์ ํ๋ก๊ทธ๋จ์ ์คํ์ํค๋ ๊ฒ์ ํดํน ์ทจ์ฝํฉ๋๋ค. ๋ค์ด๋ก๋ ์ ๋ฐฑ์ ํ๋ก๊ทธ๋จ์ด๋ window defense์ ๊ฒ์ถ๋ ์ ์์ผ๋ ์์ฌํ์๊ธธ ๋ฐ๋๋๋ค :smile:
โป ํด๋น ํจํค์ง๋ ์๋์ ๋ ํจํค์ง๋ฅผ ์ฐธ๊ณ ํ์ฌ ๋ง๋ค์ด์ก์ต๋๋ค.
$ pip install naver-blog-backer
naverblogbacker๋ crawling๊ณผ backlinking 2๊ฐ์ง ์๋น์ค๋ฅผ ์ ๊ณตํฉ๋๋ค.
from naverblogbacker.utils import isEmptyDirectory
from naverblogbacker.blog import BlogCrawler
import os
myId = 'YOUR NAVER ID'
myPath = 'SAVE DIRECTROY PATH'
mySkipSticker = 'TRUE OR FALSE'
if isEmptyDirectory(dirPath=myPath):
myBlog = BlogCrawler(targetId=myId, skipSticker=mySkipSticker, isDevMode=False)
myBlog.crawling(dirPath=myPath)
# ์ ์์ ์ผ๋ก ์คํ ์ ๋ฐฑ์
ํ ์๋ฌ ํฌ์คํธ ๊ฐ์๊ฐ ์ถ๋ ฅ
print(f'[MESSAGE] Complete! your blog posts, the number of error posts is {BlogCrawler.errorPost}')
# ์์ ๋ฉ์ธ์ง๋ฅผ ์ ๋ณด๊ธฐ ์ํด ํ๋ก๊ทธ๋จ ์ข
๋ฃ ์ ์ ์ง
os.system("pause")
โป SAVE DIRECTORY PATH๋ ๋ฐ๋์ ๋น ํด๋์ฌ์ผ ํฉ๋๋ค. ๊ทธ๋ ์ง ์์ผ๋ฉด, ์๋ฌ๊ฐ ๋ฐ์ํ๊ณ ํ๋ก๊ทธ๋จ์ด ์ข ๋ฃ๋ฉ๋๋ค.
output
from naverblogbacker.blog import BlogCrawler
import os
myId = 'YOUR NAVER ID'
myPath = 'SAVE DIRECTROY PATH'
myBlog = BlogCrawler(targetId=myId, skipSticker=mySkipSticker, isDevMode=False)
myBlog.backlinking(dirPath=myPath)
# ์ ์์ ์ผ๋ก ์คํ ์ ๋ฐฑ์
ํ ์๋ฌ ํฌ์คํธ ๊ฐ์๊ฐ ์ถ๋ ฅ
print(f' [MESSAGE] Complete! created your backlinks')
# ์์ ๋ฉ์ธ์ง๋ฅผ ์ ๋ณด๊ธฐ ์ํด ํ๋ก๊ทธ๋จ ์ข
๋ฃ ์ ์ ์ง
os.system("pause")
โป ๋ฐฑ๋งํฌ ์์ฑ api๋ ๋ฐ๋์ ๋น ํด๋์ผ ํ์๊ฐ ์์ต๋๋ค.
output
targetId
: ๋ฐฑ์
๋ฐ ๋ฐฑ๋งํฌ๋ฅผ ์ํ ์ฌ์ฉํ ๋ค์ด๋ฒ ๋ธ๋ก๊ทธ ์์ด๋์
๋๋ค.dirPath
: ๋ฐฑ์
ํน์ ๋ฐฑ๋งํฌ ๊ฒฐ๊ณผ๋ฌผ์ ์ ์ฅํ ๊ฒฝ๋ก์
๋๋ค.skipSticker
: (optional) ๋ธ๋ก๊ทธ ํฌ์คํธ ๋ด ์คํฐ์ปค ์ด๋ฏธ์ง๋ฅผ ์ ์ฅํ ์ง ๋ง์ง์ ๋ํ ์ต์
์
๋๋ค. ๊ธฐ๋ณธ๊ฐ์ True์ด๋ฉฐ, True๋ฅผ ์คํฐ์ปค ์ด๋ฏธ์ง๋ฅผ ์คํตํด ์ ์ฅํ์ง ์๋ ๊ฒ์ ๋ปํฉ๋๋ค.isDevMode
: (optional) naver-blog-backer ๋ชจ๋ ๋ด ์ฒ๋ฆฌ๋ค์ ๋ํ ์์ธ ํ์คํ ๋ฆฌ๋ฅผ ๋ณผ ์ ์๋ ๊ฐ๋ฐ์ ๋ชจ๋ ์ต์
์
๋๋ค. ๊ธฐ๋ณธ๊ฐ์ False์ด๋ฉฐ, ๋ง์ฝ True๋ก ์ ํ ์ [DEV MODE] ๋ฉ์ธ์ง๊ฐ ์ถ๋ ฅ๋ฉ๋๋ค.import os
from naverblogbacker.utils import isEmptyDirectory
from naverblogbacker.blog import BlogCrawler
from pick import pick
def main(myId, myPath, myOption):
if myOption is 'backlink':
try:
myBlog = BlogCrawler(targetId=myId, skipSticker=True, isDevMode=False)
myBlog.backlinking(dirPath=myPath)
print(f' [MESSAGE] Complete! created your backlinks')
os.system("pause")
except Exception as e:
print(e)
os.system("pause")
elif myOption is 'backup':
try:
if not isEmptyDirectory(dirPath=myPath):
pass
myBlog = BlogCrawler(targetId=myId, skipSticker=True, isDevMode=False)
myBlog.crawling(dirPath=myPath)
print(f'[MESSAGE] Complete! your blog posts, the number of error posts is {BlogCrawler.errorPost}')
os.system("pause")
except Exception as e:
print(e)
os.system("pause")
else:
print(f' [MESSAGE] Sorry, It`s currently not supported')
os.system("pause")
if __name__ == '__main__':
myId = 'YOUR NAVER ID'
myPath = 'SAVE DIRECTORY'
myOption = 'CHOOSE OPTIONS IN [backlink, backup]'
main(myId, myPath, myOption)
sample
sample
ํ์ฌ ์ด ํจํค์ง๋ ๋ค์ด๋ฒ ๋ธ๋ก๊ทธ ์๋ํฐ ๋ฒ์ ผ 4๋ง์ ์ง์ํฉ๋๋ค. (์ค๋งํธ ์๋ํฐ one) ๋ง์ฝ ๋ฐฑ์ ํ ์ ์๋ ๋ฒ์ ผ์ ํฌ์คํธ๋ฅผ ๋ง์ฃผํ๊ฒ ๋๋ฉด ์๋์ผ๋ก ์ข ๋ฃํฉ๋๋ค.
Test bed
EXE packing
Add authentication & GUI version serving
it will be making GUI version for common users
ํด๋น ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฐ ํ๋ก๊ทธ๋จ ๊ฐ๋ฐ๊ณผ ๊ด๋ จ๋ ๋ฉ๋ชจ๋ฅผ ์ํ ๊ณต๊ฐ์ ๋๋ค.
code stype : cameCase
package component python script file
how it works?
Collect specific blog's posts as a list by requesting naver blog api.
In one post item, Bring the inframe data with bs4 package by using BlogPost class
If it get inframe data, one component would be parsing and saving data while for loop
In the end of for loop, it make full text data into one file. And then save it with its assets like imags, video.
Repeats steps 2 to 4 until counting post list length
์ง์ํ๋ ์๋ํฐ ๋ฒ์ ผ์ Component ๊ตฌ์ฑ์ ํฌ๊ฒ HEADER์ CONTENT๋ก ๋๋ฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ ๋ชจ๋ ์ปจํ
์ธ ๋ <div class="se-component"></div>
๋ก ๊ตฌ์ฑ๋์ด ์์ต๋๋ค.
HEADER
CONTENT
ํ ์คํธ ์ปดํฌ๋ํธ(se-component & se-text)
์ผ๋ฐ ํ ์คํธ : se-component & se-text > se-component-content > se-section-text > se-module-text > p.se-text-paragraph & span
๊ณต๋ฐฑ ํ ์คํธ : se-component & se-text > se-component-content > se-section-text > se-module-text > p.se-text-paragraph & span (nothing)
๋งํฌ ํ ์คํธ : se-component & se-text > se-component-content > se-section-text > se-module-text > p.se-text-paragraph & se-link
ํด์ํ๊ทธ ํ ์คํธ : se-component & se-text > se-component-content > ... > se-module-text > se-text-paragraph > __se-hash-tag
์์ ๋ชฉ ์ปดํฌ๋ํธ(se-component & se-sectionTitle)
์ธ์ฉ๊ตฌ ์ปดํฌ๋ํธ(se-component & se-quotation)
๊ตฌ๋ถ์ ์ปดํฌ๋ํธ(se-component & se-horizontalLine)
์ผ์ ์ปดํฌ๋ํธ(se-component & se-schedule) โป ์ง์ํ์ง ์์
์ฝ๋ ์ปดํฌ๋ํธ(se-component & se-code)
๋ผ์ด๋ธ๋ฌ๋ฆฌ(์ฑ , ์ํ) ์ปดํฌ๋ํธ(se-component & se-material)
์ด๋ฏธ์ง ์ปดํฌ๋ํธ(se-component & se-image)
์คํฐ์ปค ์ปดํฌ๋ํธ(se-component & se-sticker)
๋น๋์ค ์ปดํฌ๋ํธ(se-component & se-video)
ํ์ผ ์ปดํฌ๋ํธ(se-component & se-file)
์ง๋ ์ปดํฌ๋ํธ(se-component & se-placeMap) โป ์ง์ํ์ง ์์
์๋ฒ ๋๋ ์ปดํฌ๋ํธ(se-component se-oembed)
FAQs
Backup your naver blog and Create backlink text file
We found that naver-blog-backer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.