Giter Club home page Giter Club logo

reddit_get_top_images's Introduction

Reddit get top images

reddit_get_top_images is a script that can be used to download all the top images from any subreddit of http://www.reddit.com.

It can be adjusted to get images from any segment of time, like images from the last hour, day, or week etc.

The script will create a folder in your $home directory called reddit_pics.

Usage

$ python get_top_images.py -s getmotivated -p w

https://zippy.gfycat.com/CelebratedLimpingFallowdeer.gif

Contributing

This project is intended as a beginner friendly collaborative code, and anyone that wants to add, extend or otherwise improve this code is free to do so. Even if they have never contributed to another repository before.

LICENSE

reddit_get_top_images is licensed under MIT

reddit_get_top_images's People

Contributors

asishm avatar bbkane avatar exodus111 avatar nagracks avatar narimiran avatar samoxive 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

Watchers

 avatar  avatar  avatar  avatar  avatar

reddit_get_top_images's Issues

How to get the caption?

It would be extremly beneficial to geet along the photos cpations/tittles of those.
Is there some way to get them?
I am interesting of for example only getting 1 photo per day, how I could get the tittle via script?

More things to add

The following are more things I want to add. I plan to submit pull requests for these, so I would appreciate any comments or objections or suggested tweaks before I start :)

  1. flag: --quiet - this will disable all output on the script so I can use it from a cronjob
  2. Documentation: The README is incorrect. --subreddits should be --subreddit (without the 's' at the end).
  3. config: read args from ~/.config/reddit_get_top_images.cfg (or the equivalent on Windows (%APPDIR% I think) if it exists or from the filepath if --config CONFIG_FILEPATH is passed as a command line argument. This will let me avoid the wrapper script I currently have.
  4. flag: --separate_dirs - this boolean flag will ensure that separate subreddits images will go into separate subdirectories (named for the subreddit) of --destination. @Nairwolf , if you want the fun of implementing this (or any of these, really), please let me know.
  5. code: slightly improve _make_path.

Thanks!

Changing download location?

Would you be interested in adding an option for specifying a download location?

For example, it could be either home directory (current setting) or current working directory (directory where's .py file - os.getcwd()).
Or maybe user could specify a path to a directory where he wants images to be saved?

Unable to run

Hi

System info:

$ cat /etc/issue
Raspbian GNU/Linux 8 \n \l

Installed dependencies:

$ sudo pip3 install -r requirements.txt
...

Run:

pi@bilderamme:~/reddit_get_top_images $ python3 get_top_images.py -s pics -p w                                                                                                        
  File "get_top_images.py", line 236
    options = {**defaults, **config_args, **passed_args}
                ^
SyntaxError: invalid syntax

OSError

python get_top_images.py -s motivation -p m throws an

OSError: [Errno 22] Invalid argument: '~\reddit_pics\motivation_jpg?1.jpeg'

Going to need some sort of validation for the file name.

Failed to run

Am I supposed to insert a 'limit' or 'period' for this to work? I did change the user_agent to my own user. Thank you for any assistance.

C:\Users\USER\Downloads\reddit_get_top_images-master\reddit_get_top_images-master>python get_top_images.py -s materialdesign -p w Traceback (most recent call last): File "get_top_images.py", line 304, in <module> subreddit, args['limit'], args['period'] File "get_top_images.py", line 48, in get_top_submissions r = praw.Reddit(user_agent='McCossum') File "C:\Users\USER\Anaconda3\lib\site-packages\praw\reddit.py", line 150, in __init__ raise ClientException(required_message.format(attribute)) praw.exceptions.ClientException: Required configuration setting 'client_id' missing. This setting can be provided in a praw.ini file, as a keyword argument to the Reddit class constructor, or as an environment variable.

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.