# wk15_1214_lineStickerDownload
1. 課本原始檔
2. 影音教學 step by step
3. stickershop 貼圖完整
4. emojishop 表情貼
5. chatGpt - local jpg
6. chatGpt - line png
## 【inclass practice】
```python
## 課本原始檔
import requests, json, os
from bs4 import BeautifulSoup
url = 'https://store.line.me/stickershop/product/8991459/zh-Hant' #人的日常
html = requests.get(url)
sp = BeautifulSoup(html.text, 'html.parser')
#datas = sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem'})
datas = sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem static-sticker'})
# 建立目錄儲存圖片
images_dir= "D:/user/Desktop/ZZZ/"
if not os.path.exists(images_dir):
os.mkdir(images_dir)
for data in datas:
imginfo = json.loads(data.get('data-preview'))
id = imginfo['id']
imgfile = requests.get(imginfo['staticUrl'])
full_path = images_dir + id + '.png'
with open(full_path, 'wb') as f:
f.write(imgfile.content)
print(full_path)
```
D:/user/Desktop/ZZZ/230054638.png
D:/user/Desktop/ZZZ/230054639.png
D:/user/Desktop/ZZZ/230054640.png
D:/user/Desktop/ZZZ/230054641.png
D:/user/Desktop/ZZZ/230054642.png
D:/user/Desktop/ZZZ/230054643.png
D:/user/Desktop/ZZZ/230054644.png
D:/user/Desktop/ZZZ/230054645.png
D:/user/Desktop/ZZZ/230054646.png
D:/user/Desktop/ZZZ/230054647.png
D:/user/Desktop/ZZZ/230054648.png
D:/user/Desktop/ZZZ/230054649.png
D:/user/Desktop/ZZZ/230054650.png
D:/user/Desktop/ZZZ/230054651.png
D:/user/Desktop/ZZZ/230054652.png
D:/user/Desktop/ZZZ/230054653.png
D:/user/Desktop/ZZZ/230054654.png
D:/user/Desktop/ZZZ/230054655.png
D:/user/Desktop/ZZZ/230054656.png
D:/user/Desktop/ZZZ/230054657.png
D:/user/Desktop/ZZZ/230054658.png
D:/user/Desktop/ZZZ/230054659.png
D:/user/Desktop/ZZZ/230054660.png
D:/user/Desktop/ZZZ/230054661.png
D:/user/Desktop/ZZZ/230054662.png
D:/user/Desktop/ZZZ/230054663.png
D:/user/Desktop/ZZZ/230054664.png
D:/user/Desktop/ZZZ/230054665.png
D:/user/Desktop/ZZZ/230054666.png
D:/user/Desktop/ZZZ/230054667.png
D:/user/Desktop/ZZZ/230054668.png
D:/user/Desktop/ZZZ/230054669.png
```python
```
```python
```
```python
#lineSticker 教學-1
import requests, json, os
from bs4 import BeautifulSoup
```
```python
#lineSticker 教學-2
url = 'https://store.line.me/stickershop/product/8991459/zh-Hant'
html = requests.get(url)
html
```
<Response [200]>
```python
#lineSticker 教學-3
html.text
```
```python
#lineSticker 教學-4
sp = BeautifulSoup(html.text, 'html.parser')
sp
```
```python
#lineSticker 教學-5
sp.title.text
```
'人的日常 – LINE貼圖 | LINE STORE'
```python
#lineSticker 教學-6
sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem static-sticker'})
```
```python
#lineSticker 教學-7
sp = BeautifulSoup(html.text, 'html.parser')
datas = sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem static-sticker'})
print(datas)
```
```python
#lineSticker 教學-8
len(datas)
```
32
```python
#lineSticker 教學-9
for data in datas:
print(data.get('data-preview'))
```
{ "type" : "static", "id" : "230054638", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054638/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054638/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054639", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054639/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054639/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054640", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054640/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054640/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054641", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054641/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054641/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054642", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054642/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054642/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054643", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054643/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054643/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054644", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054644/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054644/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054645", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054645/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054645/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054646", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054646/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054646/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054647", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054647/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054647/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054648", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054648/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054648/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054649", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054649/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054649/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054650", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054650/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054650/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054651", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054651/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054651/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054652", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054652/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054652/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054653", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054653/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054653/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054654", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054654/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054654/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054655", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054655/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054655/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054656", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054656/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054656/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054657", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054657/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054657/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054658", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054658/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054658/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054659", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054659/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054659/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054660", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054660/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054660/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054661", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054661/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054661/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054662", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054662/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054662/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054663", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054663/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054663/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054664", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054664/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054664/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054665", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054665/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054665/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054666", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054666/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054666/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054667", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054667/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054667/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054668", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054668/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054668/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
{ "type" : "static", "id" : "230054669", "staticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054669/android/sticker.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/stickershop/v1/sticker/230054669/android/sticker.png?v=1", "animationUrl" : "", "popupUrl" : "", "soundUrl" : "" }
```python
#lineSticker 教學-10
for data in datas:
imginfo = json.loads(data.get('data-preview'))
print(imginfo['id'])
print(imginfo['staticUrl'])
```
230054638
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054638/android/sticker.png?v=1
230054639
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054639/android/sticker.png?v=1
230054640
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054640/android/sticker.png?v=1
230054641
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054641/android/sticker.png?v=1
230054642
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054642/android/sticker.png?v=1
230054643
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054643/android/sticker.png?v=1
230054644
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054644/android/sticker.png?v=1
230054645
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054645/android/sticker.png?v=1
230054646
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054646/android/sticker.png?v=1
230054647
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054647/android/sticker.png?v=1
230054648
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054648/android/sticker.png?v=1
230054649
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054649/android/sticker.png?v=1
230054650
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054650/android/sticker.png?v=1
230054651
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054651/android/sticker.png?v=1
230054652
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054652/android/sticker.png?v=1
230054653
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054653/android/sticker.png?v=1
230054654
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054654/android/sticker.png?v=1
230054655
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054655/android/sticker.png?v=1
230054656
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054656/android/sticker.png?v=1
230054657
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054657/android/sticker.png?v=1
230054658
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054658/android/sticker.png?v=1
230054659
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054659/android/sticker.png?v=1
230054660
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054660/android/sticker.png?v=1
230054661
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054661/android/sticker.png?v=1
230054662
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054662/android/sticker.png?v=1
230054663
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054663/android/sticker.png?v=1
230054664
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054664/android/sticker.png?v=1
230054665
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054665/android/sticker.png?v=1
230054666
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054666/android/sticker.png?v=1
230054667
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054667/android/sticker.png?v=1
230054668
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054668/android/sticker.png?v=1
230054669
https://stickershop.line-scdn.net/stickershop/v1/sticker/230054669/android/sticker.png?v=1
```python
#lineSticker 教學-11
imges_dir = "D:/user/Desktop/ZZZ/"
if not os.path.exists(imges_dir):
os.mkdir(imges_dir)
for data in datas:
imginfo = json.loads(data.get('data-preview'))
id = imginfo['id']
imgfile = requests.get(imginfo['staticUrl'])
full_path = imges_dir + id + '.png'
with open(full_path, 'wb') as f:
f.write(imgfile.content)
print(full_path)
```
D:/user/Desktop/ZZZ/230054638.png
D:/user/Desktop/ZZZ/230054639.png
D:/user/Desktop/ZZZ/230054640.png
D:/user/Desktop/ZZZ/230054641.png
D:/user/Desktop/ZZZ/230054642.png
D:/user/Desktop/ZZZ/230054643.png
D:/user/Desktop/ZZZ/230054644.png
D:/user/Desktop/ZZZ/230054645.png
D:/user/Desktop/ZZZ/230054646.png
D:/user/Desktop/ZZZ/230054647.png
D:/user/Desktop/ZZZ/230054648.png
D:/user/Desktop/ZZZ/230054649.png
D:/user/Desktop/ZZZ/230054650.png
D:/user/Desktop/ZZZ/230054651.png
D:/user/Desktop/ZZZ/230054652.png
D:/user/Desktop/ZZZ/230054653.png
D:/user/Desktop/ZZZ/230054654.png
D:/user/Desktop/ZZZ/230054655.png
D:/user/Desktop/ZZZ/230054656.png
D:/user/Desktop/ZZZ/230054657.png
D:/user/Desktop/ZZZ/230054658.png
D:/user/Desktop/ZZZ/230054659.png
D:/user/Desktop/ZZZ/230054660.png
D:/user/Desktop/ZZZ/230054661.png
D:/user/Desktop/ZZZ/230054662.png
D:/user/Desktop/ZZZ/230054663.png
D:/user/Desktop/ZZZ/230054664.png
D:/user/Desktop/ZZZ/230054665.png
D:/user/Desktop/ZZZ/230054666.png
D:/user/Desktop/ZZZ/230054667.png
D:/user/Desktop/ZZZ/230054668.png
D:/user/Desktop/ZZZ/230054669.png
```python
#stickershop 完整
import requests, json, os
from bs4 import BeautifulSoup
#url = 'https://store.line.me/stickershop/product/8991459/zh-Hant' #人的日常
url = 'https://store.line.me/stickershop/product/24885624/zh-Hant' #喵咪跟兔嘰
html = requests.get(url)
sp = BeautifulSoup(html.text, 'html.parser')
datas = sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem static-sticker'})
imges_dir = "D:/user/Desktop/ZZZ/"
if not os.path.exists(imges_dir):
os.mkdir(imges_dir)
for data in datas:
imginfo = json.loads(data.get('data-preview'))
id = imginfo['id']
imgfile = requests.get(imginfo['staticUrl'])
full_path = imges_dir + id + '.png'
with open(full_path, 'wb') as f:
f.write(imgfile.content)
print(full_path)
```
D:/user/Desktop/ZZZ/632876774.png
D:/user/Desktop/ZZZ/632876775.png
D:/user/Desktop/ZZZ/632876776.png
D:/user/Desktop/ZZZ/632876777.png
D:/user/Desktop/ZZZ/632876778.png
D:/user/Desktop/ZZZ/632876779.png
D:/user/Desktop/ZZZ/632876780.png
D:/user/Desktop/ZZZ/632876781.png
D:/user/Desktop/ZZZ/632876782.png
D:/user/Desktop/ZZZ/632876783.png
D:/user/Desktop/ZZZ/632876784.png
D:/user/Desktop/ZZZ/632876785.png
D:/user/Desktop/ZZZ/632876786.png
D:/user/Desktop/ZZZ/632876787.png
D:/user/Desktop/ZZZ/632876788.png
D:/user/Desktop/ZZZ/632876789.png
D:/user/Desktop/ZZZ/632876790.png
D:/user/Desktop/ZZZ/632876791.png
D:/user/Desktop/ZZZ/632876792.png
D:/user/Desktop/ZZZ/632876793.png
D:/user/Desktop/ZZZ/632876794.png
D:/user/Desktop/ZZZ/632876795.png
D:/user/Desktop/ZZZ/632876796.png
D:/user/Desktop/ZZZ/632876797.png
D:/user/Desktop/ZZZ/632876798.png
D:/user/Desktop/ZZZ/632876799.png
D:/user/Desktop/ZZZ/632876800.png
D:/user/Desktop/ZZZ/632876801.png
D:/user/Desktop/ZZZ/632876802.png
D:/user/Desktop/ZZZ/632876803.png
D:/user/Desktop/ZZZ/632876804.png
D:/user/Desktop/ZZZ/632876805.png
D:/user/Desktop/ZZZ/632876806.png
D:/user/Desktop/ZZZ/632876807.png
D:/user/Desktop/ZZZ/632876808.png
D:/user/Desktop/ZZZ/632876809.png
D:/user/Desktop/ZZZ/632876810.png
D:/user/Desktop/ZZZ/632876811.png
D:/user/Desktop/ZZZ/632876812.png
D:/user/Desktop/ZZZ/632876813.png
```python
#表情貼-1
import requests, json, os
from bs4 import BeautifulSoup
#url = 'https://store.line.me/stickershop/product/8991459/zh-Hant' #人的日常
#url = 'https://store.line.me/stickershop/product/24885624/zh-Hant' #喵咪跟兔嘰
url = 'https://store.line.me/emojishop/product/646b23ff903b5543729ffa4d/zh-Hant' #超實用❤生活用語對話框
#url = 'https://store.line.me/emojishop/product/61b04cbaf864dd7f3763ab8b/zh-Hant' #超實用❤手勢/符號 動態表情貼
html = requests.get(url)
html
```
<Response [200]>
```python
#表情貼-2
sp = BeautifulSoup(html.text, 'html.parser')
#datas = sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem static-sticker'})
#datas = sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem'})
datas = sp.find_all('li', {'class':'mdCMN09Li FnStickerPreviewItem'})
print(datas)
```
[<li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "001", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/001.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/001.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/001.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/001.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "002", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/002.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/002.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/002.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/002.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "003", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/003.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/003.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/003.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/003.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "004", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/004.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/004.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/004.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/004.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "005", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/005.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/005.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/005.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/005.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "006", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/006.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/006.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/006.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/006.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "007", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/007.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/007.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/007.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/007.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "008", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/008.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/008.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/008.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/008.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "009", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/009.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/009.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/009.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/009.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "010", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/010.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/010.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/010.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/010.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "011", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/011.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/011.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/011.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/011.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "012", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/012.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/012.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/012.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/012.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "013", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/013.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/013.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/013.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/013.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "014", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/014.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/014.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/014.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/014.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "015", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/015.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/015.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/015.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/015.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "016", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/016.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/016.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/016.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/016.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "017", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/017.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/017.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/017.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/017.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "018", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/018.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/018.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/018.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/018.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "019", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/019.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/019.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/019.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/019.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "020", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/020.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/020.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/020.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/020.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "021", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/021.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/021.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/021.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/021.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "022", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/022.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/022.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/022.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/022.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "023", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/023.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/023.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/023.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/023.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "024", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/024.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/024.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/024.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/024.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "025", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/025.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/025.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/025.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/025.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "026", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/026.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/026.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/026.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/026.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "027", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/027.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/027.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/027.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/027.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "028", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/028.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/028.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/028.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/028.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "029", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/029.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/029.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/029.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/029.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "030", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/030.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/030.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/030.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/030.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "031", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/031.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/031.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/031.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/031.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "032", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/032.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/032.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/032.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/032.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "033", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/033.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/033.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/033.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/033.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "034", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/034.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/034.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/034.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/034.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "035", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/035.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/035.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/035.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/035.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "036", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/036.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/036.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/036.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/036.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "037", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/037.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/037.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/037.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/037.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "038", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/038.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/038.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/038.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/038.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "039", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/039.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/039.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/039.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/039.png?v=1);"></span>
</div>
</li>, <li class="mdCMN09Li FnStickerPreviewItem" data-preview='{ "type" : "static", "id" : "040", "staticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/040.png?v=1", "fallbackStaticUrl" : "https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/040.png?v=1", "animationUrl" : ""}'>
<div class="mdCMN09LiInner FnImage">
<span class="mdCMN09Image" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/040.png?v=1);"></span>
</div>
<div class="mdCMN09ImgPreview FnPreviewImage MdNonDisp">
<span class="mdCMN09Image FnPreview" style="background-image:url(https://stickershop.line-scdn.net/sticonshop/v1/sticon/646b23ff903b5543729ffa4d/iPhone/040.png?v=1);"></span>
</div>
</li>]
```python
#表情貼-3
imges_dir = "line_image_emojishop/生活用語對話框/"
if not os.path.exists(imges_dir):
os.mkdir(imges_dir)
for data in datas:
imginfo = json.loads(data.get('data-preview'))
id = imginfo['id']
imgfile = requests.get(imginfo['staticUrl'])
full_path = imges_dir + id + '.png'
with open(full_path, 'wb') as f:
f.write(imgfile.content)
print(full_path)
```
line_image_emojishop/生活用語對話框/001.png
line_image_emojishop/生活用語對話框/002.png
line_image_emojishop/生活用語對話框/003.png
line_image_emojishop/生活用語對話框/004.png
line_image_emojishop/生活用語對話框/005.png
line_image_emojishop/生活用語對話框/006.png
line_image_emojishop/生活用語對話框/007.png
line_image_emojishop/生活用語對話框/008.png
line_image_emojishop/生活用語對話框/009.png
line_image_emojishop/生活用語對話框/010.png
line_image_emojishop/生活用語對話框/011.png
line_image_emojishop/生活用語對話框/012.png
line_image_emojishop/生活用語對話框/013.png
line_image_emojishop/生活用語對話框/014.png
line_image_emojishop/生活用語對話框/015.png
line_image_emojishop/生活用語對話框/016.png
line_image_emojishop/生活用語對話框/017.png
line_image_emojishop/生活用語對話框/018.png
line_image_emojishop/生活用語對話框/019.png
line_image_emojishop/生活用語對話框/020.png
line_image_emojishop/生活用語對話框/021.png
line_image_emojishop/生活用語對話框/022.png
line_image_emojishop/生活用語對話框/023.png
line_image_emojishop/生活用語對話框/024.png
line_image_emojishop/生活用語對話框/025.png
line_image_emojishop/生活用語對話框/026.png
line_image_emojishop/生活用語對話框/027.png
line_image_emojishop/生活用語對話框/028.png
line_image_emojishop/生活用語對話框/029.png
line_image_emojishop/生活用語對話框/030.png
line_image_emojishop/生活用語對話框/031.png
line_image_emojishop/生活用語對話框/032.png
line_image_emojishop/生活用語對話框/033.png
line_image_emojishop/生活用語對話框/034.png
line_image_emojishop/生活用語對話框/035.png
line_image_emojishop/生活用語對話框/036.png
line_image_emojishop/生活用語對話框/037.png
line_image_emojishop/生活用語對話框/038.png
line_image_emojishop/生活用語對話框/039.png
line_image_emojishop/生活用語對話框/040.png
```python
## chatGpt local jpg
import shutil
source_path = r'C:\zzz\111.jpg'
destination_path = r'C:\zzz\2.jpg'
# 複製文件
shutil.copyfile(source_path, destination_path)
print(f'已從 {source_path} 複製到 {destination_path}')
```
```python
## chatGpt line png
import requests
import os
url = 'https://stickershop.line-scdn.net/stickershop/v1/sticker/230054638/android/sticker.png?v=1'
save_path = r'C:\zzz\3.jpg'
#response = requests.get(url, stream=True)
response = requests.get(url)
with open(save_path, 'wb') as file:
for chunk in response.iter_content(chunk_size=8192):
file.write(chunk)
print(f'已從 {url} 下載並保存到 {save_path}')
```
## 【afterclass practice】
1. 綜合演練 選擇題1-10 (需抄題在markdown cell ; 有程式碼的題目要有code cell )
2. 教學影音 lesson 10
3. 請填寫小組報告主題 --- 【期末小組】管理
4. 請填寫筆記網站網址 --- 【OMP】問卷
( A ) 1. 以open(filename[,mode][,encode]) 開啟檔案,下列何者是 mode 參數預設的模式?
(A) 讀取模式 (B) 寫入模式 (C) 附加模式 (D)以上皆是
( C ) 2. Python 提供何種內建函式,可以開啟指定的檔案,以便進行檔案內容的讀取、寫入或修改?
(A) file() (B) input() (C) open() (D) output()
( B ) 3. 下列何函式可以讀取一列字元?
(A) readable() (B) read() (C) readlines() (D)get(ch)
( B ) 4. 下列程式建立的檔案物件,可以執行何種動作?
f=open('file1.txt','w')
f.write("Hello Python!")
f.close()
(A) 讀取 (B) 寫入 (C) 可讀取也可寫入 (D) 以上皆非
( D ) 5. 執行下列程式,下列顯示結果何者正確?
try:
print(x)
except:
print("y")
finally:
print("z")
(A) x (B) y (C) xz (D) yz
```python
try:
print(x)
except:
print("y")
finally:
print("z")
```
y
z
( A ) 6. open(filename,mode,encode) 函式的參數中,其中只有那一個參數是必填?
(A) filename (B) mode (C) encode (D) 以上皆是
( B ) 7. 如果作業系統是繁體中文 Windows 系統,預設的編碼為何?
(A) UTF-8 (B) cp950 (C) unicode (D) GB2312
( D ) 8. 下列有關 readlines() 的敘述,何者正確?
(A) 會讀取全部文件內容 (B) 以串列方式傳回
(C) 包括「\n」跳列字元,甚至是隱含的字元 (D) 以上皆是
( A ) 9. 執行下列程式,下列顯示結果何者正確?
n=1
try:
print(n)
except:
print("變數不存在!")
(A) 1 (B) n (C) 變數不存在 (D) 以上皆是
```python
n=1
try:
print(n)
except:
print("變數不存在!")
```
1
( C ) 10. 班上的除錯高手大匹,在他的程式中加入了錯誤的補捉在 try…except…finally 敘述中,無論例外有沒有發生都會執行下列那些程式區塊?
(A) try (B) except (C) finally (D) 以上皆是