Created code to get Python Smart Store thumbnail image.

Asked 1 years ago, Updated 1 years ago, 98 views

import requests

from bs4 import BeautifulSoup

import urllib.request

url = input ('Enter address:')

html = requests.get(url)

bs = BeautifulSoup(html.text, 'html.parser')

description = bs.find('meta', property = 'og:image')

sumimg_url = description["content"]

saveName = r"C:\Users\air_c\OneDrive\Desktop\Save Image\itemimg.jpg"

urllib.request.urlretrieve(sumimg_url, saveName)

print('s saved.')

▲ I want to create the same code as above and get the thumbnail image in Naver Smart Store.

However, the thumbnail image at link address 1 is scratched well.

Unable to get thumbnail images at link 2 address.

What's the reason? ㅠ<

URL number 1: https://brand.naver.com/oastore/products/5127884368?NaPm=ct%3Dkiom8cco%7Cci%3D729f614681d716eb7507e299836735c696349a7a%7Ctr%3Dsbtp%7Csn%3D256847%7Chk%3Da316810714221612f5c5960ff188691cc75a3b08 URL 2: https://smartstore.naver.com/sumom/products/4779090184?NaPm=ct%3Dkiomyg60%7Cci%3D6a7489be1f2896907a887e156c6e3b467d5f5aba%7Ctr%3Dslsc%7Csn%3D293779%7Chk%3D99ddcc0202b196bfa5d2192165c0c867119d6103

python crawler

2022-09-20 19:17

1 Answers

The robots.txt at URL 2 you gave me is prohibited from being accessed.

User-agent : *
Disallow : /

Crawling is not possible in this case.

https://smartstore.naver.com/robots.txt


2022-09-20 19:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.