nang-dev / automated_youtube_channel Goto Github PK
View Code? Open in Web Editor NEWAutomated youtube that can scrape content, edit a compilation, and upload to youtube daily.
License: MIT License
Automated youtube that can scrape content, edit a compilation, and upload to youtube daily.
License: MIT License
2022 3 12 23 11 14
./MAR_2022_v12.mp4
Scraping Videos...
Starting Scraping
<instaloader.nodeiterator.NodeIterator object at 0x000001605261FC70>
Scraping From Account: funnyposts
Skipped acc funnypostsbecause of
'graphql'
Scraping From Account: tweets
Skipped acc tweetsbecause of
'graphql'
Scraping From Account: epicfunnypage
Downloaded 0 videos successfully
Scraping From Account: lmao
Skipped acc lmaobecause of
'graphql'
Scraping From Account: ight
Skipped acc ightbecause of
'graphql'
Scraping From Account: memezar
Skipped acc memezarbecause of
'graphql'
Scraping From Account: meme.ig
Downloaded 0 videos successfully
Scraped Videos!
Making Compilation...
Total Length: 0
Traceback (most recent call last):
File "C:\Users\sound\OneDrive\Desktop\chrome downloads\automated_youtube_channel-master\automated_youtube_channel-master\main.py", line 145, in
attemptRoutine()
File "C:\Users\sound\OneDrive\Desktop\chrome downloads\automated_youtube_channel-master\automated_youtube_channel-master\main.py", line 136, in attemptRoutine
routine()
File "C:\Users\sound\OneDrive\Desktop\chrome downloads\automated_youtube_channel-master\automated_youtube_channel-master\main.py", line 101, in routine
makeCompilation(path = videoDirectory,
File "C:\Users\sound\OneDrive\Desktop\chrome downloads\automated_youtube_channel-master\automated_youtube_channel-master\make_compilation.py", line 94, in makeCompilation
finalClip = concatenate_videoclips(videos, method="compose")
File "C:\Users\sound\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\video\compositing\concatenate.py", line 75, in concatenate_videoclips
so you can see both errors i get :/ I get the skipped because of 'graphql' and the downloaded 0 videos, and the smth smth smth idk just above this text
Hello Nathan,
In the first time thank you very much for give us help and for the code.
I need help to make it working....
I fill in config.py, main.py, scrape_videos.py like:
config.py:
IG_USERNAME = danibal
IG_PASSWORD = xxxxxxx
main.py:
................................................
num_to_month = {
1: "Jan",
2: "Feb",
3: "Mar",
4: "Apr",
5: "May",
6: "June",
7: "July",
8: "Aug",
9: "Sept",
10: "Oct",
11: "Nov",
12: "Dec"
}
IG_USERNAME = config.IG_USERNAME
IG_PASSWORD = config.IG_PASSWORD
print(IG_USERNAME....? Here i have to complete?)
print(IG_PASSWORD....and here?)
title = "TRY NOT TO LAUGH (BEST Dank video memes) V1"
now = datetime.datetime.now()
videoDirectory = "./DankMemes_" + num_to_month[now.month].upper() + "_" + str(now.year) + "V" + str(now.day) + "/"
outputFile = "./" + num_to_month[now.month].upper() + "" + str(now.year) + "_v" + str(now.day) + ".mp4"
INTRO_VID = '' # SET AS '' IF YOU DONT HAVE ONE
OUTRO_VID = ''
TOTAL_VID_LENGTH = 13*60
MAX_CLIP_LENGTH = 19
MIN_CLIP_LENGTH = 5
DAILY_SCHEDULED_TIME = "20:00"
TOKEN_NAME = "token.json"
SCOPES = ["https://www.googleapis.com/auth/youtube.upload"]
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
client_secrets_file = "googleAPI.json"
def routine():
# Handle GoogleAPI oauthStuff
print("Handling GoogleAPI")
creds = None
# The file token1.json stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists(TOKEN_NAME):
creds = Credentials.from_authorized_user_file(TOKEN_NAME, SCOPES)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
client_secrets_file, SCOPES)
creds = flow.run_console()
# Save the credentials for the next run
with open(TOKEN_NAME, 'w') as token:
token.write(creds.to_json())
googleAPI = build('youtube', 'v3', credentials=creds)
now = datetime.datetime.now()
print(now.year, now.month, now.day, now.hour, now.minute, now.second)
#metadataFile = "./metadata-" + num_to_month[now.month].upper() + "_" + str(now.year) + "_v" + str(now.day) + ".txt"
description = ""
print(outputFile)
if not os.path.exists(videoDirectory):
os.makedirs(videoDirectory)
# Step 1: Scrape Videos
print("Scraping Videos...")
scrapeVideos(username = danibal,
password = xxxxxxxxx,
output_folder = videoDirectory,
days=1)
print("Scraped Videos!")
description = "Enjoy the memes! :) \n\n" \
"like and subscribe to @Chewy for more \n\n" \
# Step 2: Make Compilation
print("Making Compilation...")
makeCompilation(path = videoDirectory,
introName = INTRO_VID,
outroName = OUTRO_VID,
totalVidLength = TOTAL_VID_LENGTH,
maxClipLength = MAX_CLIP_LENGTH,
minClipLength = MIN_CLIP_LENGTH,
outputFile = outputFile)
print("Made Compilation!")
description += "\n\nCopyright Disclaimer, Under Section 107 of the Copyright Act 1976, allowance is made for 'fair use' for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.\n\n"
description += "#memes #dankmemes #compilation #funny #funnyvideos \n\n"
# Step 3: Upload to Youtube
print("Uploading to Youtube...")
uploadYtvid(VIDEO_FILE_NAME=outputFile,
title=title,
description=description,
googleAPI=googleAPI)
print("Uploaded To Youtube!")
# Step 4: Cleanup
print("Removing temp files!")
# Delete all files made:
# Folder videoDirectory
shutil.rmtree(videoDirectory, ignore_errors=True)
# File outputFile
try:
os.remove(outputFile)
except OSError as e: ## if failed, report it back to the user ##
print ("Error: %s - %s." % (e.filename, e.strerror))
print("Removed temp files!")
def attemptRoutine():
while(1):
try:
routine()
break
except OSError as err:
print("Routine Failed on " + "OS error: {0}".format(err))
time.sleep(60*60)
#attemptRoutine()
schedule.every().day.at(DAILY_SCHEDULED_TIME).do(attemptRoutine)
attemptRoutine()
while True:
schedule.run_pending()
time.sleep(60) # wait one min
SCRAPE_VIDEOS.PY:
import datetime
import dateutil.relativedelta
from instalooter.looters import InstaLooter, ProfileLooter
import instaloader
from instalooter.cli.login import login
def scrapeVideos(username = "",
password = "",
output_folder = "",
days = 1):
print("Starting Scraping")
L = instaloader.Instaloader()
# Login or load session for loader
L.login(username, password)
profile = instaloader.Profile.from_username(L.context, username)
following = profile.get_followees()
print(following)
today = datetime.date.today()
timeframe = (today, today - dateutil.relativedelta.relativedelta(days=days))
for profile in following:
acc = profile.username
looter = ProfileLooter(acc, videos_only=True, template="{id}-{username}-{width}-{height}")
if not looter.logged_in():
looter.login(username, password)
print("Scraping From Account: " + acc)
try:
numDowloaded = looter.download(output_folder, media_count=30, timeframe=timeframe)
print("Downloaded " + str(numDowloaded) + " videos successfully")
print("")
except Exception as e:
print("Skipped acc " + acc + "because of");
print(e);
if name == "main":
scrapeVideos(username = danibal,
password = XXXXXXX,
output_folder = "./Memes_December_4")
I received this Error:
NameError: name 'Danibal' is not defined
Please let me know whats happening.
Regards,
Daniel
I get these errors after running main.py.
I loaded all the modules from the requirements.txt.
Any ideas what can be the reason?
MBP-Dyakover:automated_youtube_channel dyakover$ python3 main.py
Traceback (most recent call last):
File "/Users/dyakover/Documents/Python_Projects/automated_youtube_channel/main.py", line 1, in
from scrape_videos import scrapeVideos
File "/Users/dyakover/Documents/Python_Projects/automated_youtube_channel/scrape_videos.py", line 3, in
from instalooter.looters import InstaLooter, ProfileLooter
File "/Users/dyakover/Documents/Python_Projects/automated_youtube_channel/instalooter.py", line 1, in
from instalooter.looters import ProfileLooter
ModuleNotFoundError: No module named 'instalooter.looters'; 'instalooter' is not a package
Hi,
The script works up until it tries to compile the video, I have intsalled FFMPEG but it didn't make any difference - Anyone else getting this ?
''
Moviepy - Building video ./JUNE_2021_v15.mp4.
MoviePy - Writing audio in /tmp/temoaudiofile.m4a
chunk: 0%| | 2/5574 [00:01<1:06:47, 1.39it/s, now=None]Routine Failed on OS error: [Errno 32] Broken pipe
MoviePy error: FFMPEG encountered the following error while writing file /tmp/temoaudiofile.m4a:
b'/tmp/temoaudiofile.m4a: No such file or directory\r\n'
In case it helps, make sure you are using a recent version of FFMPEG (the versions in the Ubuntu/Debian repos are deprecated). ''
Hello,
Ive run the code and everything goes perfectly well and I reach the end of it by uploading the video to Youtube and cleaning up afterwards the temp files.
However, once the video is uploaded to YouTube, YouTube flags it as private video and no-one can see it except me. The reason they have put in their community guidelines is because of unverified API.. but what does that even mean ?
have you encountered anything similar? or is it something related to when I created the Google project and the API key there ?
Traceback (most recent call last):
File "/home/animesh/Downloads/automated_youtube_channel-master/main.py", line 145, in
attemptRoutine()
File "/home/animesh/Downloads/automated_youtube_channel-master/main.py", line 136, in attemptRoutine
routine()
File "/home/animesh/Downloads/automated_youtube_channel-master/main.py", line 90, in routine
scrapeVideos(username = IG_USERNAME,
File "/home/animesh/Downloads/automated_youtube_channel-master/scrape_videos.py", line 28, in scrapeVideos
looter = ProfileLooter(acc, videos_only=True, template="{id}-{username}-{width}-{height}")
File "/home/animesh/Downloads/automated_youtube_channel-master/automation/lib/python3.9/site-packages/instalooter/looters.py", line 705, in init
super(ProfileLooter, self).init(**kwargs)
File "/home/animesh/Downloads/automated_youtube_channel-master/automation/lib/python3.9/site-packages/instalooter/looters.py", line 287, in init
token = get_shared_data(res.text)['config']['csrf_token']
File "/home/animesh/Downloads/automaty_youtube_channel-master/automation/lib/python3.9/site-packages/instalooter/_utils.py", line 94, in get_shared_data
return json.loads(match.group(1))
AttributeError: 'NoneType' object has no attribute 'group'
Please Remove The Sample Video from this repo, It is Increasing the size with +90mb
when I run the command in cmd it responds with this: "ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'" Can someone please fix this?
I receive the following error when running main.py?
File "/home/al/automated_youtube_channel/main.py", line 145, in
attemptRoutine()
File "/home/al/automated_youtube_channel/main.py", line 136, in attemptRoutine
routine()
File "/home/al/automated_youtube_channel/main.py", line 90, in routine
scrapeVideos(username = IG_USERNAME,
File "/home/al/automated_youtube_channel/scrape_videos.py", line 18, in scrapeVideos
L.login(username, password)
File "/home/al/.local/lib/python3.8/site-packages/instaloader/instaloader.py", line 425, in login
self.context.login(user, passwd)
File "/home/al/.local/lib/python3.8/site-packages/instaloader/instaloadercontext.py", line 202, in login
resp_json = login.json()
File "/home/al/.local/lib/python3.8/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 518, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Code is not moving forward from this point. I can see the loader object has created but nothing is working while credentials are correct and set up properly.
Could you please help me to resolve this issue or at least point me in the right direction if I'm missing something here?
After running main.py and copy and pasting the url in browser it shows this problem
E:\automated_youtube_channel-master>python3 main.py
Handling GoogleAPI
2022 7 2 9 40 48
./JULY_2022_v2.mp4
Scraping Videos...
Starting Scraping
<instaloader.nodeiterator.NodeIterator object at 0x00000143CFC357E0>
Traceback (most recent call last):
File "E:\automated_youtube_channel-master\main.py", line 145, in
attemptRoutine()
File "E:\automated_youtube_channel-master\main.py", line 136, in attemptRoutine
routine()
File "E:\automated_youtube_channel-master\main.py", line 90, in routine
scrapeVideos(username = IG_USERNAME,
File "E:\automated_youtube_channel-master\scrape_videos.py", line 28, in scrapeVideos
looter = ProfileLooter(acc, videos_only=True, template="{id}-{username}-{width}-{height}")
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\instalooter\looters.py", line 705, in init
super(ProfileLooter, self).init(**kwargs)
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\instalooter\looters.py", line 287, in init
token = get_shared_data(res.text)['config']['csrf_token']
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\instalooter_utils.py", line 94, in get_shared_data
return json.loads(match.group(1))
AttributeError: 'NoneType' object has no attribute 'group'
does anyone know how to fix this ?
Error shows when scraping the videos. How can I fix?
No matter what user profile(I have tried following many profiles and made sure the profiles have videos), what different timeframes I use, or whether I try to logout and log back in, I get "Downloaded 0 videos successfully", and thus everything else fails.
Is there anything else I need to make this work? I followed all the steps.
hello, I'm getting these errors. can somebody help me? thanks in advance.
`Scraping Videos...
Starting Scraping
[...]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Name\Desktop\Python\automated_youtube_channel\main.py", line 145, in
attemptRoutine()
File "C:\Users\Name\Desktop\Python\automated_youtube_channel\main.py", line 136, in attemptRoutine
routine()
File "C:\Users\Name\Desktop\Python\automated_youtube_channel\main.py", line 90, in routine
scrapeVideos(username = IG_USERNAME,
File "C:\Users\Name\Desktop\Python\automated_youtube_channel\scrape_videos.py", line 18, in scrapeVideos
L.login(username, password)
File "C:\Users\Name\AppData\Local\Programs\Python\Python39\lib\site-packages\instaloader\instaloader.py", line 483, in login
self.context.login(user, passwd)
File "C:\Users\Name\AppData\Local\Programs\Python\Python39\lib\site-packages\instaloader\instaloadercontext.py", line 226, in login
raise ConnectionException("Login error: JSON decode fail, {} - {}.".format(login.status_code, login.reason))
instaloader.exceptions.ConnectionException: Login error: JSON decode fail, 403 - Forbidden.`
Handling GoogleAPI
2022 8 11 15 41 44
./AUG_2022_v11.mp4
Scraping Videos...
Starting Scraping
Routine Failed on OS error: Expecting value: line 1 column 1 (char 0)
Either If I use Visuals studio or CMD,
when I use instaloader --login {YOUR_USERNAME} or instaloader login, I can't Input my password,
Putting my username works, but the scanner for Password is dead, I tried many times, but It seems like either something interrupts it, or it's broken.
I keep NoneType' object is not subscriptable after running scrape videos. I think the error is coming from this region. Any tips?
or profile in following:
acc = 'profile.username'
looter = ProfileLooter(acc, videos_only=True, template="{id}-{username}-{width}-{height}")
if not looter.logged_in():
Skipped acc profile.username of
'NoneType' object is not subscriptable
I keep getting this error
Total Length: 0
Traceback (most recent call last):
File "c:\Users\betha\Downloads\automated_youtube_channel-master\automated_youtube_channel-master\main.py", line 146, in
attemptRoutine()
File "c:\Users\betha\Downloads\automated_youtube_channel-master\automated_youtube_channel-master\main.py", line 137, in attemptRoutine
routine()
File "c:\Users\betha\Downloads\automated_youtube_channel-master\automated_youtube_channel-master\main.py", line 102, in routine
makeCompilation(path = videoDirectory,
File "c:\Users\betha\Downloads\automated_youtube_channel-master\automated_youtube_channel-master\make_compilation.py", line 94, in makeCompilation
finalClip = concatenate_videoclips(videos, method="compose")
File "C:\Users\betha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\moviepy\video\compositing\concatenate.py", line 75, in concatenate_videoclips
w = max(r[0] for r in sizes)
ValueError: max() arg is an empty sequence
PS C:\Users\betha\Downloads\automated_youtube_channel-master>
~/saeed $ git clone https://github.com/nathan-149/automated_youtube_channel
Cloning into 'automated_youtube_channel'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (23/23), done.
error: RPC failed; curl 56 OpenSSL SSL_read: Connection reset by peer, errno 104
error: 4722 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Facing this:
<instaloader.nodeiterator.NodeIterator object at 0x000001B5B8213A90>
Scraping From Account: funny_videos
Skipped acc funny_videosbecause of
user not found: 'funny_videos'
Scraping From Account: funny.homevideos
Skipped acc funny.homevideosbecause of
user not found: 'funny.homevideos'
Scraping From Account: try_not_to_laugh_funny_videos
Skipped acc try_not_to_laugh_funny_videosbecause of
user not found: 'try_not_to_laugh_funny_videos'
Scraping From Account: cattoseverywhere
Skipped acc cattoseverywherebecause of
user not found: 'cattoseverywhere'
Scraping From Account: cattobrat
Skipped acc cattobratbecause of
user not found: 'cattobrat'
Scraping From Account: memerzvidz
Skipped acc memerzvidzbecause of
user not found: 'memerzvidz'
Scraping From Account: fuckjerry.tv
Skipped acc fuckjerry.tvbecause of
user not found: 'fuckjerry.tv'
Scraped Videos!
Making Compilation...
Total Length: 0
Traceback (most recent call last):
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\main.py", line 144, in
attemptRoutine()
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\main.py", line 135, in attemptRoutine
routine()
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\main.py", line 100, in routine
makeCompilation(path = videoDirectory,
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\make_compilation.py", line 94, in makeCompilation
finalClip = concatenate_videoclips(videos, method="compose")
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\video\compositing\concatenate.py", line 75, in concatenate_videoclips
w = max(r[0] for r in sizes)
ValueError: max() arg is an empty sequence
C:\Users\Gebruiker\Desktop\automated_youtube_channel-master>
I am getting the following error after running the main method:
The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at https://console.developers.google.com/apis/credentials/oauthc
This is all that shows on screen. Any idea how to fix it? Is it something with the code?
Traceback (most recent call last):
File "/Users/pavlos/Desktop/automated_youtube_channel/venv/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 202, in login
resp_json = login.json()
File "/Users/pavlos/Desktop/automated_youtube_channel/venv/lib/python3.9/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/pavlos/Desktop/automated_youtube_channel/main.py", line 145, in
attemptRoutine()
File "/Users/pavlos/Desktop/automated_youtube_channel/main.py", line 136, in attemptRoutine
routine()
File "/Users/pavlos/Desktop/automated_youtube_channel/main.py", line 90, in routine
scrapeVideos(username = IG_USERNAME,
File "/Users/pavlos/Desktop/automated_youtube_channel/scrape_videos.py", line 18, in scrapeVideos
L.login(username, password)
File "/Users/pavlos/Desktop/automated_youtube_channel/venv/lib/python3.9/site-packages/instaloader/instaloader.py", line 425, in login
self.context.login(user, passwd)
File "/Users/pavlos/Desktop/automated_youtube_channel/venv/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 204, in login
raise ConnectionException("Login error: JSON decode fail, {} - {}.".format(login.status_code, login.reason))
instaloader.exceptions.ConnectionException: Login error: JSON decode fail, 400 - Bad Request.
File "main.py", line 102
introName = hope you liked it
^
SyntaxError: invalid syntax
Whenever it finishes scarping you get an error
Moviepy - Building video ./JUNE_2021_v12.mp4.
MoviePy - Writing audio in /tmp/temoaudiofile.m4a
chunk: 0%| | 0/11857 [00:00<?, ?it/s, now=None]Routine Failed on OS error: [Errno 32] Broken pipe
MoviePy error: FFMPEG encountered the following error while writing file /tmp/temoaudiofile.m4a:
b'/tmp/temoaudiofile.m4a: No such file or directory\r\n'
In case it helps, make sure you are using a recent version of FFMPEG (the versions in the Ubuntu/Debian repos are deprecated).
if you check this link below its being discussed on the github page:
instaloader/instaloader#1150
the error effects the entire program. Just wanted to know if anyone is using the software and experienceing it.
If so, i believe a different by using a different library to perform the instaloader tasks (and of course changing all the syntax to suit it) would solve the issue.
Many thanks
Hi guys, I'm getting this errors after running "main.py". After this errors I get html code for an Instagram page saying "There's nothing here".
Any ideas ? Thx !
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/instaloader/instaloadercontext.py", line 224, in login
resp_json = login.json()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value]
Hello community,
I need help to fix this error.
I thank you in advance
Starting Scraping
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 224, in login
resp_json = login.json()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Best regards
When I Run The Program , I Get This Error
Traceback (most recent call last):
File "main.py", line 47, in <module>
flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/google_auth_oauthlib/flow.py", line 203, in from_client_secrets_file
with open(client_secrets_file, "r") as json_file:
FileNotFoundError: [Errno 2] No such file or directory: 'googleAPI.json'```
How About You Make A New Video How To Get The Api Key , Or Can You Just Teach me In My Dms , My Username Is ₣₳Đ3Đ ₦1₦J₳#1371 In Discord , Thank You Soo Much For The Code
I keep getting this issue... I installed moviepy by typing: sudo pip3 install moviepy. I tried many other methods that was suggested on Google but not working.
I noticed I get this message "The locate database (/var/db/locate.database) does not exist" when I try to locate app-get. Can this be the issue? Will I have to set up a database?
NameError: name 'instaloader' is not defined
Not sure what to do here....
This Is My Error
Traceback (most recent call last):
File "C:\Users\lucas\Desktop\automated_youtube_channel-master\main.py", line 145, in
attemptRoutine()
File "C:\Users\lucas\Desktop\automated_youtube_channel-master\main.py", line 136, in attemptRoutine
routine()
File "C:\Users\lucas\Desktop\automated_youtube_channel-master\main.py", line 71, in routine
creds = flow.run_console()
AttributeError: 'InstalledAppFlow' object has no attribute 'run_console'
Traceback (most recent call last):
File "C:\Users\Stephen Lajuwomi\Downloads\AutomatedCompilationChannel-master\main.py", line 15, in
scrapeVideos(username = InstagramLoginInfo.InstagramId,
File "C:\Users\Stephen Lajuwomi\Downloads\AutomatedCompilationChannel-master\ScrapeVideos.py", line 34, in scrapeVideos
looter.login(username, password)
File "C:\Users\Stephen Lajuwomi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\instalooter\looters.py", line 547, in login
self._login(username, password, session=self.session)
File "C:\Users\Stephen Lajuwomi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\instalooter\looters.py", line 180, in _login
raise SystemError('Login error: Token not found')
SystemError: Login error: Token not found
You can’t sign in because XYZ sent an invalid request. You can try again later, or contact the developer about this issue.
File "main.py", line 102
introName = hope you liked it
^
SyntaxError: invalid syntax
Everyting worked I have uploaded 5 videos to my youtube channel but now it skipping all my channels?
<instaloader.nodeiterator.NodeIterator object at 0x0000023B3601DD60>
Scraping From Account: funny_videos
Skipped acc funny_videosbecause of
user not found: 'funny_videos'
Scraping From Account: funny.homevideos
Skipped acc funny.homevideosbecause of
user not found: 'funny.homevideos'
Scraping From Account: try_not_to_laugh_funny_videos
Skipped acc try_not_to_laugh_funny_videosbecause of
user not found: 'try_not_to_laugh_funny_videos'
Scraping From Account: cattoseverywhere
Skipped acc cattoseverywherebecause of
user not found: 'cattoseverywhere'
Scraping From Account: cattobrat
Skipped acc cattobratbecause of
user not found: 'cattobrat'
Scraping From Account: memerzvidz
Skipped acc memerzvidzbecause of
user not found: 'memerzvidz'
Scraping From Account: fuckjerry.tv
Skipped acc fuckjerry.tvbecause of
user not found: 'fuckjerry.tv'
Scraped Videos!
Making Compilation...
Total Length: 0
Traceback (most recent call last):
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\main.py", line 144, in
attemptRoutine()
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\main.py", line 135, in attemptRoutine
routine()
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\main.py", line 100, in routine
makeCompilation(path = videoDirectory,
File "C:\Users\Gebruiker\Desktop\automated_youtube_channel-master\make_compilation.py", line 94, in makeCompilation
finalClip = concatenate_videoclips(videos, method="compose")
File "C:\Users\Gebruiker\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\video\compositing\concatenate.py", line 75, in concatenate_videoclips
w = max(r[0] for r in sizes)
ValueError: max() arg is an empty sequence
C:\Users\Gebruiker\Desktop\automated_youtube_channel-master>
I run the bot as intended. Returns Error: raise IOError(("MoviePy error: failed to read the duration of file %s.\n"
OSError: MoviePy error: failed to read the duration of file ./Memes_APR_2021_V8/2546583872676854731-pubity-750-1333.mp4.
Here are the file infos returned by ffmpeg:
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20200122
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000208f86182c0] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000208f86182c0] moov atom not found
./Memes_APR_2021_V8/2546583872676854731-pubity-750-1333.mp4: Invalid data found when processing input
I don't know whats causing this. as far as I know everything within the code is correct. maybe there is an update I am missing?
anyway, please help. thanks!
login to any account you wanna make instaloader to use from your #browser.
create a new session file:
instaloader -l --user-agent '<your browser's User-agent>'copy the path and use the session anytime.
Note: dont use the account or even open it in your browser after you get the session file, no logout no missing with it #
from previous issue, cannot make sense of it
Scraping Videos...
Starting Scraping
<instaloader.nodeiterator.NodeIterator object at 0x0000029E8B455F28>
Traceback (most recent call last):
File "main.py", line 145, in
attemptRoutine()
File "main.py", line 136, in attemptRoutine
routine()
File "main.py", line 93, in routine
days=1)
File "C:\Users\mrdho\Dropbox\automated_youtube_channel-master\scrape_videos.py", line 28, in scrapeVideos
looter = ProfileLooter(acc, videos_only=True, template="{id}-{username}-{width}-{height}")
File "C:\Python3\lib\site-packages\instalooter\looters.py", line 705, in init
super(ProfileLooter, self).init(**kwargs)
File "C:\Python3\lib\site-packages\instalooter\looters.py", line 287, in init
token = get_shared_data(res.text)['config']['csrf_token']
File "C:\Python3\lib\site-packages\instalooter_utils.py", line 94, in get_shared_data
return json.loads(match.group(1))
AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "C:\Users\arcas\Desktop\automated_youtube_channel-master\main.py", line 145, in
attemptRoutine()
File "C:\Users\arcas\Desktop\automated_youtube_channel-master\main.py", line 136, in attemptRoutine
routine()
File "C:\Users\arcas\Desktop\automated_youtube_channel-master\main.py", line 71, in routine
creds = flow.run_console()
File "C:\Users\arcas\AppData\Local\Programs\Python\Python39\lib\site-packages\google_auth_oauthlib\flow.py", line 414, in run_console
self.fetch_token(code=code)
File "C:\Users\arcas\AppData\Local\Programs\Python\Python39\lib\site-packages\google_auth_oauthlib\flow.py", line 288, in fetch_token
return self.oauth2session.fetch_token(self.client_config["token_uri"], **kwargs)
File "C:\Users\arcas\AppData\Local\Programs\Python\Python39\lib\site-packages\requests_oauthlib\oauth2_session.py", line 246, in fetch_token
raise ValueError(
ValueError: Please supply either code or authorization_response parameters.
This is the error message. Could anybody help me fix it?
Best regards
I really don't know what I'm doing to begin with but would still like to learn. I think I'm starting right at the beginning and already having problems. I'm trying to install the libraries and keep getting
File "<stdin>", line 1
pip install -r requirements.txt
^^^^^^^
SyntaxError: invalid syntax
can't tell how i can fix this?
Traceback (most recent call last):
File "C:\Users\leap\Dropbox\My PC (DESKTOP-7IBEVFE)\Desktop\automated_youtube_channel-master\main.py", line 1, in
from scrape_videos import scrapeVideos
File "C:\Users\leap\Dropbox\My PC (DESKTOP-7IBEVFE)\Desktop\automated_youtube_channel-master\scrape_videos.py", line 2, in
import dateutil.relativedelta
ModuleNotFoundError: No module named 'dateutil'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.