Giter Club home page Giter Club logo

auto-youtube-subscription-playlist-2's People

Contributors

danilose avatar deepfriedmind avatar elijas avatar evertonbatini avatar fabian42 avatar jesperdramsch avatar logicer16 avatar michalpawl avatar pekapa avatar raleph avatar sinasab avatar victorjzsun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-youtube-subscription-playlist-2's Issues

Update frequency and "findnextrow" clash

Using findnextrow to set the minimum row in the spreadsheet will skip processing for all preceding rows. If the update frequency of the lower rows is lower than earlier rows, this leads earlier rows to be skipped.

What is the reason to use findnextrow instead of simply setting initial iRow to reservedTableRows to process all rows reliably?

ADD sync times for each channel

each channel should have their own sync times

use case A:

user has lots of playlists and lots of channels in each playlist.
sync is unable to complete in the 6 mins alloted by Google

use case B:

user adds a new channel and wants all the videos from it from date X in the past

Script successfully finished, but no video's added to playlist

So the script itself says that it ran successfully and that it added a couple of video's, but when I look at my watch later playlist, there are no video's added. I tried the older and updated version of the script, but I got the same result. Also my watch later playlist says that it updated today.
1
2
3
4

Cannot query for user RedstoneQuarry

I recently added "RedstoneQuarry" to the sheet for this channel: https://www.youtube.com/c/RedstoneQuarry/videos
Since then, it got stuck on that entry with the debug sheet message "Cannot query for user RedstoneQuarry".
When I use "UUW_OAaMdUH3fF00fh8_Koeg" instead, which is the playlist ID of their automatic "all uploads" playlist, that fails with "Cannot query for user UUW_OAaMdUH3fF00fh8_Koeg". Only the channel ID, which is "UCW_OAaMdUH3fF00fh8_Koeg" (C as second character) works, which can apparently only be obtained by saving the HTML source of the channel page and finding the »"externalId":"UCW_OAaMdUH3fF00fh8_Koeg"« element in some long JSON object (or maybe it's always the playlist ID, but with a C?).
Other short channel URLs, like "slicedlime", "TheHappieCat" or "SiberianHat" work fine.

Pull spreadsheet id on onOpen call

Prevent users from forgetting to change the id, better to do it automatically.
Since the link to spreadsheet automatically opens it, this script will be guaranteed to run at least once.

Or maybe another alternative on when to pull id?

Errors when undefined

On line 17 I added a condition to suppress an error
if (sheet == undefined || sheet.toString() != 'Sheet')...

yougather.xyz login problems: Server Error (500)

For the most part, yougather.xyz has been working phenomenally for me. Makes it super easy to watch a chronological list of subscriptions in the Watch Later list.

Recently, I noticed that videos were not being added. This came after I enabled 2 factor authentication. I've tried logging into yougather.xyz, but all I get is "Server Error (500)". Clearing cache, using a different computer, using incognito (on chrome), using a different browser does not resolve anything.

Any suggestions going forward? For now I've reverted to using the script + google sheets.

Playlist has a large ammount of repeated videos

Hello! I have run in to an error where videos get added multiple times in the same playlist.

For some reason this only happened in one of the four playlist I have created. I have tried to recreate this playlist multiple times, but sadly this error eventually always happened again.

So, I assume it has something to do with the list of channels for this playlist?

I really don’t know, is there anyway to solve this problem?

Script doesn't work with empty channels

There are a few channels that I added to my script to see if they ever upload videos. One example is this one: https://www.youtube.com/channel/UCAqzgFGOss0mFN0OUKkdqMw/videos
When I add "UCAqzgFGOss0mFN0OUKkdqMw" to the sheet, I get this error message now:

Cannot search YouTube with playlist id UU2ynvCFT085PuHzwG0xO8nA, ERROR: Message: [API call to youtube.playlistItems.list failed with error: The playlist identified with the request's playlistId parameter cannot be found.] Details: {"code":404,"message":"The playlist identified with the request's playlistId parameter cannot be found.","errors":[{"reason":"playlistNotFound","location":"playlistId","locationType":"parameter","domain":"youtube.playlistItem","message":"The playlist identified with the request's playlistId parameter cannot be found."}]}

This did not use to happen, so I assume some YouTube API change broke it. It also happens with channels that used to have videos, but no longer do. The "<code>" tags are part of the error message, but get parsed by Github as markdown. I guess that's intentional.

UTC Issue

I realize that the UTC is not GMT, but I tried changing the UTC offset to R (eastern standard), instead of it being set to Z, and nothing fixes my issue.

The issue: I believe the timestamp is ahead of time from the youtube video upload time, as if I change the timestamp back several hours, it fixes the issue.

Any ideas?

function ISODateString(d) { // modified from src:
http://stackoverflow.com/questions/7244246/generate-an-rfc-3339-timestamp-similar-to-google-tasks-api
function pad(n){return n<10 ? '0'+n : n}

return d.getUTCFullYear()+'-'
+ pad(d.getUTCMonth()+1)+'-'
+ pad(d.getUTCDate())+'T'
+ pad(d.getUTCHours())+':'
+ pad(d.getUTCMinutes())+':'
+ pad(d.getUTCSeconds())+'.000R'

Script runs but not fetching any new videos

Dear @Elijas et al,

I set up your script successfully. I performed the initial update to create the timestamp. Then I waited until a new video got uploaded to one of the channel ids.

I ran the script again. It succeeded without any error. However, the video did not get added to the playlist.

Do you have any ideas how I could further debug this?

I am adding some screenshots.

Yours

image

image

image

image

image

Cannot find function toString in object

The script failed 24 out of 24 times yesterday, with the following error:

TypeError: Cannot find function toString in object {year=2019, month=2, day-of-month=13, day-of-week=3, week-of-year=7, hour=21, minute=34, second=58, timezone=UTC, authMode=FULL, triggerUid=1232464547}. (line 17, file "Code")

A pointer what to do would be nice. I've checked the channels and playlists, they all exist. I would like to avoid debugging a program in a language that I don't know again. :D

Filter by title

Is there a way - and I believe it would have to be done in function getVideoIdsWithLessQueries to filter videos by title so only videos containing a certain phrase would be included into the playlist?

Some channels work only after hotfix in editor

Some channels (eg. UC6Iaz96RkYE-MOjnq5NPgqw) work only after hotfix in editor. This may have something to do with

if (e.parameter.update == "True") {

Because when it is commented all is updated as expected, but with this line update is not performed. This work on channels with playlist in them, but for this without that line make's error

updatePlaylists | Bad value (line 17, file "Code")

Limit number of videos to import per channel

Is there a way to limit the number of videos to import per channel? I have a playlist which videos are added from different channels. some of the channels have too many videos so i would like to import just a certain number from them so that my quota doesnt get used up by only one channel. I will appreciate your help!

Hitting Daily Quota limit after first execution

Upon first execution of the Updateplaylist function (after the timestamp is settled) videos will add. However, any attempt to update the sheet afterwards results in the following error: "API call to youtube.playlistItems.insert failed with error: Daily Limit Exceeded."

I've tried to access the quota and view the project, but every time I follow the link it says "failed to load". Is there something I'm missing in the setup to allow me to access the project? Should I try to manually setup the spreadsheet and script vs copying the sheet to see if that resolves the issues?

TypeError: Cannot read property "items" from undefined.

Seems like working, but only date is updated and error appears.
For keystring: PL1YG9ktx9sVfaeZtTh0riY1nOrHkWaj6c it produce that error.
Of more info needed let me know.

XHR finished loading: POST "https://docs.google.com/spreadsheets/u/0/d/1YjauQJ8HCsnfHcb6GBUV33MpRMVYm70pthcLLV0UFso/scripts/invoke?ruid=221&id=ZZZZZZZZZZZ&lib=M2zyjyQPfO10gQct8sMcXmj5r6QE2Pvz2&func=insideUpdate&ctx=%7B%22gid%22%3A%220%22%2C%22scol%22%3A2%2C%22ecol%22%3A3%2C%22srow%22%3A3%2C%22erow%22%3A4%7D&usit=1&sid=2297dc458b0a1a14&c=1&w=1&smv=33&token=ZZZZZZZZZZZ&includes_info_params=true".
p.send @ 720521041-ritz_waffle_i18n_core__pl.js:321
KR.Wfa @ 720521041-ritz_waffle_i18n_core__pl.js:4224
wm.send @ 720521041-ritz_waffle_i18n_core__pl.js:479
p.OPb @ 720521041-ritz_waffle_i18n_core__pl.js:4153
p.send @ 720521041-ritz_waffle_i18n_core__pl.js:4152
lUb.N3 @ 720521041-ritz_waffle_i18n_core__pl.js:4228
p.Ae @ 720521041-ritz_waffle_i18n_core__pl.js:477
p.mLa @ 4080546244-ritz_waffle_i18n_ritzmaestro__pl.js:113
p.kPb @ 4080546244-ritz_waffle_i18n_ritzmaestro__pl.js:126
wqa @ 720521041-ritz_waffle_i18n_core__pl.js:436
zjc @ 2995667118-ritz_waffle_i18n_postshellbase__pl.js:20
MDd @ 4080546244-ritz_waffle_i18n_ritzmaestro__pl.js:126
p.hob @ 4080546244-ritz_waffle_i18n_ritzmaestro__pl.js:137
p.jK @ 720521041-ritz_waffle_i18n_core__pl.js:602
p.xc @ 720521041-ritz_waffle_i18n_core__pl.js:606
(anonymous) @ 720521041-ritz_waffle_i18n_core__pl.js:1093
Zca @ 720521041-ritz_waffle_i18n_core__pl.js:100
p.dispatchEvent @ 720521041-ritz_waffle_i18n_core__pl.js:98
p.Qh @ 720521041-ritz_waffle_i18n_core__pl.js:844
p.Jo @ 720521041-ritz_waffle_i18n_core__pl.js:843
p.Jo @ 720521041-ritz_waffle_i18n_core__pl.js:850
p.mY @ 720521041-ritz_waffle_i18n_core__pl.js:953
Xca @ 720521041-ritz_waffle_i18n_core__pl.js:95
Tca @ 720521041-ritz_waffle_i18n_core__pl.js:96
c @ 720521041-ritz_waffle_i18n_core__pl.js:2402
(anonymous) @ 720521041-ritz_waffle_i18n_core__pl.js:92
4080546244-ritz_waffle_i18n_ritzmaestro__pl.js:112`
Google Apps Script: TypeError: Cannot read property "items" from undefined.

Error when private video added to playlist

When a newly uploaded private video gets added to one of the playlists on the right, the script tries to add it to the playlist on the left and fails. The debug sheet shows this error:

Couldn't update playlist with video (UuZv1vdNoxM), ERROR: Message: [API call to youtube.playlistItems.insert failed with error: Video not found.] Details: {"message":"Video not found.","code":404,"errors":[{"domain":"youtube.playlistItem","reason":"videoNotFound","message":"Video not found."}]}

This might be related to the fact that "made for kids" videos now cannot be added to playlists (usually?), so it probably fails on all private videos, because it can't check if it has that property set or not. But that's just a guess.

I don't know what the best solution would be here, because just skipping all private videos would make the script not add any videos ever that were uploaded with a schedule.

Strange mail from YouTube, maybe related to this script?

I got mails from YouTube that asked me to fill in "YouTube API compliance audits". After contacting various semi-helpful Google support chats/phone numbers, I got a suspicion that this might be caused by this script.
Has anyone else experienced this and maybe even knows how to handle this? Apparently YouTube now imposed additional limits to my API usage. I didn't see any major issues so far from that, but maybe I will in the future.

Better error Handling

On the first run, I didn't change any value in the spreadsheet so the script wasn't able to find the playlist it is written by default and it came up with an "undefined variable.items.length"

So maybe better handle error when a playlist cannot be found.

Thanks, awesome scripts!

Can't update by playlist ID

I managed to get new videos from channels, but when I do the same with playlists ID I get this error:

Cannot search YouTube, ERROR: Message: [API call to youtube.search.list failed with error: Invalid channel.] Details: {"message":"Invalid channel.","code":400,"errors":[{"domain":"youtube.search","reason":"invalidChannelId","message":"Invalid channel.","locationType":"parameter","location":"channelId"}]}

Tried both playlists from my account and different users, same results. I haven't seen people mention this unless I'm doing something wrong. Also I'm using a YouTube account from back in the day.

Seems to skip (some?) videos that are uploaded while the channel is streaming

This channel has a 24/7 music stream: https://www.youtube.com/user/epicmusicvn/videos
But they also upload regular videos. Recently one video got added to my playlist, but two days ago one was skipped.
The most logical explanation seems to be that the script ignores everything as long as a stream is running so that it doesn't keep adding old, deleted streams. And that the channel had a brief stream pause when it published one of the videos, but not for the other. But I don't know for sure.

Seems that Live Videos don't get Ignored and Results in Error

Error: 1 video(s) were not added to playlists correctly, please check Debug sheet. Timestamps for respective rows has not been updated.

I get this error, and I believe it is because one video that is from a subscription is live. Which doesn't need to be downloaded anyways. I am still new to using this service, so let me know if it's something I am doing wrong.

But I am lead to believe that it's the live video. Anyways it would be nice for the service to ignore it instead of giving an error.
Thanks for your time.

TimeStamp Updated when Daily Quota Reached

I've got the script running and it added the videos from the last day. When trying to add videos from a week ago, I got the following error:

Jan 4, 2020, 9:00:31 PM Error Error: 90 videos were not added to playlist correctly, please check Debug sheet. Timestamp has not been updated.
at updatePlaylists(Code:151)
at insideUpdate(Code:427)

Upon checking the debug sheet, I saw that I was hitting the Youtube API quota limit. I tried running Update Playlists again, but this time the the script logged that I've hit the Daily Quota Limit, however, it still updated the TimeStamp.

I'm thinking that any quota related error should mean the time stamp is not updated.

Fails if playlist is deleted

The last successful run on 1.8.2018 at 4:35, since then every hourly run gives this error message for the updatePlaylists function:
TypeError: Cannot read property "items" from undefined. (line 169, file "Code")
Sadly Google Sheets doesn't give any more output than that.

Quota Exceeded

Does this project use the same key and ID? I keep getting

Could not get subscribed channels, ERROR: Message: [API call to youtube.subscriptions.list failed with error: The request cannot be completed because you have exceeded your quota.] Details: {"errors":[{"domain":"youtube.quota","message":"The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota.","reason":"quotaExceeded"}],"code":403,"message":"The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota."}

No matter what day or anything. How do i fix this issues as it was working perfectly fine till about May 22nd and this started to happen. I have thousands of calls i can use but i am curious if this is using your Key and your KEY is reached its limit.

Cannot update playlist for brand account using personal account

I followed the instructions, but couldn't execute the second step completely:

2. Allow the Sheets to access Youtube:
  * Then, Google Developers Console / Youtube Data API / Enable API, close the tab, go back to Script Editor and click OK

I can't find any Google Developers Console in the Resources / Advanced Google Services dialog. According to https://developers.google.com/apps-script/guides/services/advanced#enabling_advanced_services that option is available for a standard GCP project (or an older default GCP project that was created prior to April 8, 2019).

Nonetheless I tried to "Update Playlists" in the sheet document and this is the error message in the debug sheet:

Mon Oct 28 16:19:57 EET 2019 Couldn't update playlist with video (5Aq7jyS8AAU), ERROR: Beim API-Aufruf von "youtube.playlistItems.insert" ist dieser Fehler aufgetreten: Forbidden

Sorry for the German log message. It means something like Couldn't update playlist with video (5Aq7jyS8AAU), ERROR: The following error occured at api call "youtube.playlistItems.insert": Forbidden

Script is not working.

Since 2019-09-18 the script has stopped working,

If you're a user:

If you're a programmer:

  • We'd appreciate if you could take a look at it, I'd happily merge the PR and give a shout-out in the main README.

Just a typo on the app...

I literally found this like 5 minutes ago (yougather.xyz) and i'm super excited to give this a try.

I found a typo... when the page is loading, it says:

Found 473 channels.
Playlists using subscritptions will be updated accordingly.

Thanks!

No videos added to playlists

For a few days already, no new videos get added to my playlists. There's no error message and the debug sheet just says "Acquired 0 videos" for each.

Script updatePlaylists experienced an error

When running Update Playlist function as usual, after 3-4 seconds of running the script get an error: Script updatePlaylists experienced an error. I didn't change anything and it was running well for more than a year prior. Anyone with similar issue?

Script not adding new videos

The script was working perfectly until yesterday. It doesn't show any errors but new videos are not being added to my playlist. I tried to disable and re-enable the YouTube API but that didn't help. I attached the updatePlaylists script.. could someone please check to see if it looks correct? I have around 1100 videos on my playlist but that shouldn't be an issue (I know it stops working once you have 5000 videos on the playlist).

Any help would be appreciated.
Thanks in advance,

Aaron

Duplicates

When updating I get duplicates of videos, and some videos from the subscription feed are skipped/not included in the automated playlist.

Script fails if video gets deleted while script runs

I just got a mail with this error:
Document 1eNL_C5WZZSiM5ULX3hvikaK9pqPKdKfKATZ0Znxqric is missing (perhaps it was deleted?) (line 17, file "Code")
I suspect that means that a new video was detected by the script, then deleted by the uploader and then the script tried to add it to my playlist.
Worst case scenario: In a playlist that allows duplicates, all videos that the script had already handled before the error would be added twice.

Logging into yougather.xyz results in a server error.

Here is an image what I see. The right part on the page shows up after I click reload channels in the menu. The left side repeats the error when I try to reload the playlists. This is my first time logging into this site, but I have created a subscriptionPlaylists google sheet copy and tried it there. I wanted to see how it would work on the site, but I can't do anything currently.
screen shot 2016-09-28 at 12 00 07 pm

Error when deploying webapp

Hi,

when trying to deploy the script as a web app I get following error:

Exception: No HTML file named index was found. (line 481, file "Code")

Thx for your help

option to get all old videos as well as new ones

Is there anyway to set an option to add all the videos from the channels ive entered into the playlist. I wish to run a playlist on the tv at my shop for customers, but id like it to add all the videos from the channels so i can put the playlist on random and repeat and it be able to play 24/7, but only adding new videos from the channels I've entered doesn't give me enough content to keep playing all day.

If theres an edit to script i can do to make it do so please give me some feedback id really appreciate it. Im using google sheets for the playlist

YouTube search broken -> App broken

Currently the app is broken and it's basically impossible to fix, without rewriting this thing entirely.

https://support.google.com/youtube/thread/2494861?hl=en

YouTube have broken their search filters a couple days ago. You can try it out on the website itself too, it's not just the API we use.

Writing this as top issue for people to find easily. The rewrite of this app would include some kind of cache of videos that have already been added. Considering the amount of work this would take and the space this would take up, I'd suggest waiting until YouTube itself is fixed.

You can subscribe to the issue on Google to get updated. The newest version here with PR #33 will not stop the error messages, but it will make sure the script will start with the videos where YouTube got broken, instead of updating itself despite the errors.

TypeError in line 27

TypeError: Second argument to Function.prototype.apply must be an array. (line 27, file "")

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.