Jessime / youtube_history

A quick analysis of all Youtube videos in a user's history.
MIT License
83 stars 4 forks source link

invalid syntax / not prompted for google credentials #9

Closed ghost closed 2 years ago

ghost commented 5 years ago

$ python youtube_history.py

File "youtube_history.py", line 138 print(f'Executing youtube-dl command:\n\n{fake}\n') SyntaxError: invalid syntax

                                                 ^
Jessime commented 5 years ago

Are you using python 3.6 or higher?

ghost commented 5 years ago

you're fast! all switched over & set up now, sorry I failed to dig into closed issues : )

side questions ... for username, i have been using my email. that doesn't appear to be working.

what is the correct username we need to be pointing it to?

ghost commented 5 years ago

[youtube:history] Downloading login page WARNING: unable to fetch login page: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)> [youtube:history] Youtube History: Downloading webpage ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)> (caused by URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')))

No data was downloaded.

Jessime commented 5 years ago

Yea, the login part is more difficult, because google uses a lot of different methods to make sure you’re not a bot.

But you should just be using your gmail account (the same thing you would use to log into chrome, for example) to login.

I’ll have to wait till I’m at a computer to look into the SSL error.

On Tue, Apr 23, 2019 at 4:40 PM Lisette notifications@github.com wrote:

[youtube:history] Downloading login page WARNING: unable to fetch login page: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)> [youtube:history] Youtube History: Downloading webpage ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)> (caused by URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')))

No data was downloaded.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Jessime/youtube_history/issues/9#issuecomment-485965984, or mute the thread https://github.com/notifications/unsubscribe-auth/ACAZVSU4JTGJKYRTAGXXIETPR5X5PANCNFSM4HH6BJ5Q .

--


Jessime Kirk Bioinformatics and Computational Biology Ph.D. Candidate University of North Carolina at Chapel Hill Phone: 606-748-5863

ghost commented 5 years ago

gotcha! I went ahead & download the raw data.

do i still need to verify myself before changing the non-default directory for the data?

ghost commented 5 years ago

i needed to install python certificates : )

ghost commented 5 years ago

image

and this is where i am at — any ideas? thanks again for your help!

Jessime commented 5 years ago

Sorry, I’m a little bit confused. Did you manage to get the raw data files downloaded or not yet?

ghost commented 5 years ago

SSL error was due to python certificates that needed to be downloaded — resolved.

Currently getting an Error 400: Bad Request upon entering the username + password.

Anything I can do to resolve there? Or, since I have the raw watch history data, can I circumvent the username/password step at all?

Jessime commented 5 years ago

If you give the -o / --out flag a directory that contains the raw data (the program checks this by looking for a file named 00001.info.json), then you don't need any credentials, since the download step is skipped.