---
# System prepended metadata

title: 教師與學生分享用

---

# 教師與學生分享用
---

## 0510資訊素養研習分享
:::info
1.下載並安裝VSCODE程式
2.開新檔案
3.貼上程式碼
4.貼上單一影片網址  或  播放清單網址
5.按"F5"   或    run    執行
6.影片出現

--- 
下載單一影片:

from pytube import YouTube
url="https://youtu.be/jRcKzxPTS-I"
yt = YouTube(url)
stream = yt.streams.filter(res="720p").first().download()

---
下載播放清單:

from pytube import Playlist
playlist = Playlist('輸入影片清單')
for video in playlist.videos:
    video.streams.filter(res="720p").first().download()
:::
## 高中資訊科技 

###網路爬蟲分享


```
import  urllib.request,csv
url = 'https://data.nhi.gov.tw/Datasets/Download.ashx?rid=A21030000I-D50001-001&l=https://data.nhi.gov.tw/resource/mask/maskdata.csv'
webpage = urllib.request.urlopen(url)  #開啟網頁
data = csv.reader(webpage.read().decode('utf-8').splitlines()) #讀取資料到data陣列中


for i in data:
  a="橋頭區"
  if a in i[2]:
    print('店名名稱->',i[1],'成人口罩=',i[4], '兒童口罩=',i[5])

```
### 安裝flask分享
:::success
1.自建資料夾py，並下載程式碼到py
2.python 安裝時pip要勾，安裝到自建的資料夾py，開cmd，不要關
3.cd.. >cd..>cd py
4.C:\py>pip install pytube
5.C:\py>pip install flask
6.C:\py>set FLASK_APP=pytube_dl_2.py
7.C:\py>flask run --host=0.0.0.0
8.瀏覽器連到http://10.2.18.2~~00~~:5000/download


[單一](https://drive.google.com/file/d/1PD297T3iz5qTLzc0nxHfC6JuXc4Ky6Gs/view?usp=share_link)

[playlist](https://drive.google.com/file/d/1zwMOxTr8rrTQI0BojC7hHED8-cuRQJOd/view?usp=share_link)

[python](https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe)
:::

## 國中資訊科技
### 課程心得分享
:::info

[底圖](https://lh3.googleusercontent.com/O-avM8XjBAhXLn1z2tjlct4GjLkeqjWCe5w5mCzI6omfThkDoiQ52buNW5VsuIj198hBwG6bkexxzLPXzIFdIL4CHYNGjkEvgOqSIUdYMVLW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Frdfw3JpuZhkDKh4n1E-t4XwDhRksDOaqwP4YOEvi4I7cKeptTy21Nz4zMnP_E89LtMSvfw4xceH2hGJTq4V9k1oeQot7BeD-llz04O2NfPMualPfkoqPRQ_8J-oLXlPMSa_xORZN8EJbwdPJnr82oPc6zUbIlyIAeZHVr3rfWheiisdrP5rk12NBGvUKBMMNOVzG0NIlSNu58Q9xPzctS4sTb43SRKsXY6UMNvfEfROd92QwcPvNxAtKw7Din-7IMe4b2pWIRsrufr1f92kuGnoZrhwae52oBBWV3zTouvAnvAWS_P9QGKmf0SVP7G2rUjZamiWqSxpCaqXpJqU8_suMWWTnoOXNI88A07BIYPPkwowZ9gvsvWXgTy_-9flWSbHJHinzgH4NSPFpkppn_pdEGt4faWsmDeWTEBuyXs_HRf5R8RXMpk3Vb6DelJXpbJNd85Abethy85NTyd-yQahh86UOIhJLHuPTQR0bS2hZmi1HzVAMWhWM4wU4y2YN3PKBuBjHlBFtq3kezGoV8OHpL0n71r5YyIU4mS-IGuHMOEUDnjRd-KNdd5S23SklGvlUKWG3MaOoRPjUk9blHifS7BFxqbNtVX_iD70JOkT4qg7zXnSQk6aXJ1Icky1YtZNZP37ChPyacNkaWo1naBtKvcd9TgGtydbjaGAFOHWuYbSCaEjvEBJcEtuJ3ErNfMiz8y_svUKZakrwWYC70xgYN=w700-h393-s-no?authuser=0)

:::







