Seung Park
@seungvictor
Reviews Written
3
Average Rating
5.0
Posts
Q&A
Route๊ด๋ จ์ง์
์ ๊ฐ์ฌ๋ v6๊ฐ ์ฌ์ฉ์ค์ด์์ต๋๋ค๋ง์๋๋ก ์์ ํ๋ ์๋ฉ๋๋ค ๊ฐ์ฌํฉ๋๋ค
- 0
- 2
- 333
Q&A
๊ฐ์ค์ด๋ํ๊ท
์๋ ํ์ธ์ ์ ์๋ ์ ๋ ๋ ์๋งค์ถ ๋น๊ต๊ฐ์์์๋์ค๋ lag๋ฅผ ์ฌ์ฉํ๋ ์ข๋ ๊ฐํธํ๊ฒ ์์ฑ์ด ๋๋ ๊ฒ ๊ฐ์ต๋๋ค lag๋ ๋ถ๋ช ํ fundamental๊ฐ์์์๋ ์ค๋ช ํด ์ฃผ์ จ์๋๋ฐ ๊น๋จน๊ณ ์๋ค๊ฐ...ํ์ํ ์ํฉ์์ ํด๋น ๋ถ๋ถ ๊ฐ์๋ค์ผ๋ ์ ์ฉ์ด ๋๋ค์ ใ ใ ;; ํ๋ ์์ฌ์ด๊ฑด query์ ์ฌ์ฌ์ฉ์ฑ์ธ๋ฐ์ ๋ง์ฝ 20์ผ ๊ฐ์คํ๊ท ์ ์ค๋ค๋ผ๋ฉด 20๊ฐ ์ ๋ถ ํจ์๋ฅผ ์ ๋ ฅํด์ค์ผํ๋??๊ทธ๋ฐ ๋ถํธํจ์ด ์๋ค์ ํ์ด์ฌ์์๋ ์์๋ ๊ฐ์ค์น ๋ฑ์ ๋ฅผ ๋ณ์๋ก ์ง์ ํด์ ์ผ์๊ฐ ๋ง๋๋ผ๋ ์ฝ๋๋ฅผ ์ค์ผ ์ ์์๊ฑฐ ๊ฐ์๋ฐ SQL์์ ์์๋ฅผ ๋ณ์๋ก ์ง์ ํ ์ ์์๊น์? ์์ปจ๋ ์ผ์ = x ๋ก ์ง์ ํด์ x๋ง ๋ฐ๊พธ๋ฉด query์ ๋ณ์๋ ์๋์ผ๋ก ๋ฐ๋์ด ์ฝ๋์ ์ฌ์ฌ์ฉ์ด ๊ฐ๋ฅํ๊ฒ ๋ง๋ค ์ ์๋์ง์? (์ฌ์ง)
- 0
- 2
- 504
Q&A
Scrapy ๋ค์ํ ์ฌ์ฉ๋ฒ: Scrapy ๋ก ๋ค์ด๋ฒ Open API ํฌ๋กค๋งํ๊ธฐ2 [12:12]
์ง๋ฌธ์๋ถ ๊ถ๊ธ์ฆ์ ๊ฐ์์ ๋์จ ๋ฅผ ์จ์ ํน์๋ฌธ์์ฒ๋ผ ์๊ธด ํ๊ทธ๋ฅผ ์์ด๋๋ฐ ๋ค์ []๋๊ดํธ๋ ์ ์์์ด์ง๋๊ณ ๋ฌผ์ด๋ณด์ ๊ฑฐ ๊ฐ๋ค์ ๋ 1๊ฐ ์ด์์ whitespace๋ฅผ ์ ๊ฑฐํ๋ ์ ๊ทํํ์์ด๊ณ ์ฐพ์๋ณด๋ p tag๋ whitespace๋ฅผ ๋ง๋ ๋ค๊ณ ํ๋ค์ ๊ทธ๋์ ptag๋ง ์ ๊ฑฐ๋๊ฒ๊ฐ์ต๋๋ค The tag generates a paragraph break. It is applied to a section of text that is a block of text separated from nearby blocks of text by a blank space and/or first-line indent.
- 0
- 2
- 371
Q&A
์๋๋ถ(phantele47)๊ณผ ๋์ผํ ๋ฌธ์ ๊ฐ ๋ฐ์ํด์ ๋ฌธ์๋๋ฆฝ๋๋ค.
์ ๋ body_as_unicode()๊ฐ ์๋จน๋ค์ ์์์จ์ฃผ์ text๋ก ๋ณ๊ฒฝํด์ ์ค์ตํ์ต๋๋ค
- 0
- 6
- 859
Q&A
2-8-1 ๋ค์ด๋ฒ์ด๋ฏธ์ง ํฌ๋กค๋ง ์ง๋ฌธ
๋ง์ํด์ฃผ์ ๋์ฝ๋์ฝ๋๋ฅผ ํ์ฉํ์ฌ ์ ๋ ๋์ ์์ด ์ด๋ฏธ์ง ๋ค์ด๋ก๋ ๋ง๋ค์ด๋ดค์ต๋๋ค ์คํฌ๋กค ์์ด ๋ณด์ด๋๊ฒ๋ง ๋ค์ด๋ก๋๋๋๊ฑฐ๋ผ 49~50๊ฐ์ ๋ ๋ค์ด๋๋๋ผ๊ตฌ์ ๋ธ๋ผ์ฐ์ ๋ฅผ ์คํฌ๋กค ํ ์ดํ์ ํ์ํ๋ฉด ๋ ๋ค์ด๋ก๋๋ ๊ฒ๊ฐ์ต๋๋ค ์ ๋ ๋์์์ด ์คํฌ๋กค๋ ๊ฐ๋ฅํ ๊น์??? ๊ถ๊ทน์ ์ผ๋ก๋ ๋ค์ด๋ฒ ์ด๋ฏธ์ง๊ฒ์์ ์ง์ "์ฌ์" ๊ฐ์ query๋ฅผ ๋ ๋ ค์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ์์ค๋ ๋ฐฉ๋ฒ์ ์๊ณ ์ถ์ต๋๋ค from bs4 import BeautifulSoup import urllib.request as req import urllib.parse as rep import sys import io import os from urllib import parse sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding='utf-8') sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding='utf-8') opener = req.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] req.install_opener(opener) base = "https://search.naver.com/search.naver?where=image&sm=tab_jum&query=" quote = rep.quote_plus("์ฌ์") url = base + quote res = req.urlopen(url) savePath = "./imagedown" # C:\imagedown\ try: if not (os.path.isdir(savePath)): os.makedirs(os.path.join(savePath)) except OSError as e: if e.errno != errno.EEXIST: print("ํด๋ ๋ง๋ค๊ธฐ ์คํจ!") raise soup = BeautifulSoup(res, "html.parser") # naver ์ด๋ฏธ์ง ๊ฒ์๊ฒฐ๊ณผ์์ ์ด๋ฏธ์งurl parserํ๊ธฐ a = soup.select("#main_pack > script:nth-child(10)") b = a[0].text c = b.split(",") d = [x.strip() for x in c] e = [x for x in d if x.startswith("\"originalUrl\":")] f = [x.replace("\"", "") for x in e] img_list = [] for i in range(len(f)): encoded_url =f[i].split(":")[1] #parserํ ์ด๋ฏธ์ง url decodingํ๊ธฐ decoded_url = parse.unquote(encoded_url, encoding="utf-8") img_list.append(decoded_url) for i, img_list in enumerate(img_list, 1): fullFileName = os.path.join(savePath, savePath + str(i) + '.jpg') req.urlretrieve(img_list, fullFileName) print("๋ค์ด๋ก๋ ์๋ฃ")
- 1
- 3
- 546




