인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

plus4700097's profile image
plus4700097

asked

Introduction to Python and Creating Various Automated Applications Using Web Crawling

[ Wait a minute! ] Download YouTube videos with Python and automate conversion to mp3!

KeyError: 'url_encoded_fmt_stream_map' 에러가 발생합니다.

Written on

·

184

0

import pytube

yt = pytube.YouTube("https://www.youtube.com/watch?v=VpP3fvAmSt4")

단 두줄 작성했는데 오류가 발생하는 참사가 발생했습니다.ㅠㅠ

Traceback (most recent call last):

  File "/Users/sangsoohan/PycharmProjects/section2/youtube_downloader.py", line 3, in <module>

    yt = pytube.YouTube("https://www.youtube.com/watch?v=VpP3fvAmSt4")

  File "/Users/sangsoohan/opt/anaconda3/envs/section2/lib/python3.5/site-packages/pytube/__main__.py", line 88, in __init__

    self.prefetch_init()

  File "/Users/sangsoohan/opt/anaconda3/envs/section2/lib/python3.5/site-packages/pytube/__main__.py", line 97, in prefetch_init

    self.init()

  File "/Users/sangsoohan/opt/anaconda3/envs/section2/lib/python3.5/site-packages/pytube/__main__.py", line 143, in init

    mixins.apply_descrambler(self.player_config_args, fmt)

  File "/Users/sangsoohan/opt/anaconda3/envs/section2/lib/python3.5/site-packages/pytube/mixins.py", line 96, in apply_descrambler

    for i in stream_data[key].split(',')

KeyError: 'url_encoded_fmt_stream_map'

python웹-크롤링

Answer 2

0

python 3.7 로 한 후 pip 로 pytube 설치 하니까 되네요

0

niceman님의 프로필 이미지
niceman
Instructor

https://github.com/nficano/pytube/issues/552

안녕하세요. 해당 에러는 제작자 이슈에 등록되어 수정되었지만 반영이 되지 않은 상태로 보입니다.

우선은 예제를 건너 가시고 다음 수업 진행을 부탁드립니다.

파이썬 버전에 따라 실행 되는 경우가 있는 듯 한데 아직 에러 픽스 반영을 좀 기다려야 될 것 같습니다.

감사합니다.

plus4700097's profile image
plus4700097

asked

Ask a question