Git Product home page Git Product logo

youtube-channel-transcript-api's Issues

OSError: [Errno 22] Invalid argument

#I can get transcripts from some channels really smoothly, but sometimes I get this error message:

Traceback (most recent call last):
File "C:\Users\coope\PycharmProjects\HelloWorld\app.py", line 7, in
videos_errored = channel_getter.write_transcripts('C:/Users/coope/Desktop/HHClubNite_Transcripts/') # don't forget to have that last /
File "C:\Users\coope\PycharmProjects\HelloWorld\venv\lib\site-packages\youtube_channel_transcript_api\transcripts.py", line 52, in write_transcripts
with open(filepath, 'w') as f:
OSError: [Errno 22] Invalid argument: 'C:/Users/coope/Desktop/HHClubNite_Transcripts/Spencer_Jones_asks_โ€˜Do_You_Remember_My_Mum?โ€™.json'

#Other examples:

OSError: [Errno 22] Invalid argument: 'C:/Users/coope/Desktop/PeepShow_Transcripts/Mark_and_Jez_Play_Doubles_Tennis_|_Peep_Show.json'

OSError: [Errno 22] Invalid argument: "C:/Users/coope/Desktop/Comedyon4_Transcripts/BAD_DAY??_๐Ÿค”_This_will_make_you_laugh_so_hard_you'll_cry_๐Ÿคฃ๐Ÿ”ฅ_Ep._20.json"

#Is the problem possibly that the video titles include irregular characters like emojis, '|' and '?'

#I am new to python, so I could be making a basic error, this is the code I used (the same code works perfectly with some channels):

from youtube_channel_transcript_api import YoutubeChannelTranscripts
channel_getter = YoutubeChannelTranscripts('UCEZVbBq-gdk0_P369jZv0Vw', 'My_API_Key')
videos_errored = channel_getter.write_transcripts('C:/Users/coope/Desktop/HHClubNite_Transcripts/', just_text=True)

Get transcriptions from channel/playlist

Hi,

I would like to get the transcription of this channel/playlist (explore>news>worldnews) : https://www.youtube.com/channel/UCvAvFl2OGsuDSoOo93Kd0nA

I tried :
from youtube_channel_transcript_api import YoutubePlaylistTranscripts channel_getter = YoutubePlaylistTranscripts('World News','UCvAvFl2OGsuDSoOo93Kd0nA', 'myapikey') videos_data, videos_errored = channel_getter.get_transcripts()

But it didn't work, I have this following error:
404 Client Error: Not Found for url: https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId=UCvAvFl2OGsuDSoOo93Kd0nA&key=myapikey&pageToken=

Can you help me please ? Is it because this page https://www.youtube.com/channel/UCvAvFl2OGsuDSoOo93Kd0nA use a lot of playlist, with videos of others channels ?

Thanks,
Cheers,
Camille

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.