Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def Exas():
- import praw
- imgcount = 0
- reddit = praw.Reddit(client_id='CENSORED',
- client_secret='CENSORED',
- user_agent='TheBigScraper(By u/scrappermaster)',
- username='scrappermaster',
- password='thescrapperisscrap')
- listoftitles = []
- listofurls = []
- # whichone = input('what subreddit do you want to access? ')
- # endlimit = input('what number of pictures do you want to download? ')
- whichoner = whichone
- ender = int(endlimit.get())
- subreddit = reddit.subreddit(whichone)
- for submission in subreddit.hot(limit=int(ender)):
- title = submission.title
- link = submission.url
- Both = title + " " + link
- if '.jpg' in link :
- listofurls.append(link)
- listoftitles.append(title)
- import tkinter as tk
- root = tk.Tk()
- root.title("InstagramBot")
- root.geometry('320x125')
- whichone = str(tk.StringVar())
- endlimit = tk.StringVar()
- lblWhichone = tk.Label(root, text = 'Subreddit Name:').grid(row = 0, column = 0, padx = 0, pady = 10)
- entWhichone = tk.Entry(root, textvariable = whichone).grid(row = 0, column = 1)
- lblIntendlimit = tk.Label(root, text = 'Number of Pictures:').grid(row = 1, column = 0, padx = 0, pady = 10)
- entendlimit = tk.Entry(root, textvariable = endlimit).grid(row = 1, column = 1)
- btn = tk.Button(root, text = 'Execute', command = Exas, fg='red', font='Helvetica 18 bold').grid(row = 5, column = 1)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement