Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

Python directory is changing

hi while working in python I had file in path /Users/xxxxx/Own_Projects/automation/instagram/instagram.py I give in code diff path as in code but it also take path to /Users/kavinselvaraj/Own_Projects I don't know y can one help with that enter image description here

code:

import instaloader
from instaloader import Post
import json

with open('/Users/username/Own_Projects/automation/instagram/log.json', 'r') as f:
    data = json.load(f)

username = data['Username']
password = data['password']
directory = "/Users/xxxxxx/Desktop"

loader = instaloader.Instaloader()
loader.login(username, password)

download = Post.from_shortcode(loader.context, 'CKQJCCZhYvc')

loader.download_post(download, target=directory)    

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...