GithubHelp home page GithubHelp logo

skyme5 / snapchat-dl Goto Github PK

View Code? Open in Web Editor NEW
54.0 2.0 9.0 175 KB

Snapchat Public Story Downloader

License: MIT License

Makefile 9.03% Python 90.97%
snapchat snapchat-stories downloader stories download snap snapstories

snapchat-dl's Introduction

Snapchat Public Stories Downloader

Python Package Python Wheel CI Code Coverage Python Versions The Uncompromising Code Formatter Monthly Downloads License: MIT

Buy Me A Coffee

Installation

Install using pip,

pip install snapchat-dl

Install from GitHub,

pip install git+git://github.com/skyme5/snapchat-dl

Unix users might want to add --user flag to install without requiring sudo.

Usage


usage: snapchat-dl [-h] [-c | -u] [-i BATCH_FILENAME] [-P DIRECTORY_PREFIX]
                   [-s] [-d] [-l MAX_NUM_STORY] [-j MAX_WORKERS] [-t INTERVAL]
                   [--sleep-interval INTERVAL] [-q]
                   [username [username ...]]

positional arguments:
  username              At least one or more usernames to download stories
                        for.

optional arguments:
  -h, --help            show this help message and exit
  -c, --scan-clipboard  Scan clipboard for story links
                        ('https://story.snapchat.com/<s>/<username>').
  -u, --check-for-update
                        Periodically check for new stories.
  -i BATCH_FILENAME, --batch-file BATCH_FILENAME
                        Read usernames from batch file (one username per
                        line).
  -P DIRECTORY_PREFIX, --directory-prefix DIRECTORY_PREFIX
                        Location to store downloaded media.
  -s, --scan-from-prefix
                        Scan usernames (as directory name) from prefix
                        directory.
  -d, --dump-json       Save metadata to a JSON file next to downloaded
                        videos/pictures.
  -l MAX_NUM_STORY, --limit-story MAX_NUM_STORY
                        Set maximum number of stories to download.
  -j MAX_WORKERS, --max-concurrent-downloads MAX_WORKERS
                        Set maximum number of parallel downloads.
  -t INTERVAL, --update-interval INTERVAL
                        Set the update interval for checking new story in
                        seconds. (Default: 10m)
  --sleep-interval INTERVAL
                        Sleep between downloads in seconds. (Default: 1s)
  -q, --quiet           Do not print anything except errors to the console.

snapchat-dl's People

Contributors

dependabot[bot] avatar skyme5 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

Watchers

 avatar  avatar

snapchat-dl's Issues

KeyError: "snap"

  • Snapchat Downloader version: 1.0.0
  • Python version: 3.8
  • Operating System: Windows 10 x64

Description

KeyError is raised when downloading stories.

KeyError: "snaps"

Execution succeeds, however nothing is saved to disk

  • Snapchat Downloader version: 1.4.3
  • Python version: 3.9.9
  • Operating System: Windows 10 x64

Description

Attempting to download stories succeeds, however no media is saved to disk. The folder is empty.

What I Did

snapchat-dl.exe -P C:\Users\aiden.admin\Downloads\media\snapstories\ username
2021-12-22 17:33:17.627 | INFO     | snapchat_dl.snapchat_dl:download:104 - [+] username has 4 stories
2021-12-22 17:33:17.629 | INFO     | snapchat_dl.snapchat_dl:download:135 - [✔] username stories downloaded

Downloads invalid media files

  • Snapchat Downloader version: 1.2.1
  • Python version: 3.9.6
  • Operating System: Android 10 (Termux)

Description

Sometimes stories get downloaded but they're not valid media files. Account is public.

What I Did

snapchat-dl -s -j 1 --sleep-interval 10

This is how they look like in gallery, you can't view them: https://i.imgur.com/8qapHpN.jpg
Here's the files: mega.nz/ 2cBilLTB#7mdH3Y2KSYHCp6lfC_akPg

APIResponseError exception occurred

  • Snapchat Downloader version: 1.4.1
  • Python version: 3.8
  • Operating System: Win10

Description

Getting snapchat_dl.utils.APIResponseError

What I Did

$> snapchat-dl -P Z:/Snapchat -s
2021-10-13 10:56:49.021 | INFO     | snapchat_dl.utils:use_prefix_dir:128 - Added 165 usernames from Z:/Snapchat
Traceback (most recent call last):
  File "c:\python\python38\lib\site-packages\snapchat_dl\snapchat_dl.py", line 65, in _web_fetch_story
    user_info = util_web_user_info(response_json)
  File "c:\python\python38\lib\site-packages\snapchat_dl\utils.py", line 167, in util_web_user_info
    return content["props"]["pageProps"]["userProfile"]["publicProfileInfo"]
KeyError: 'publicProfileInfo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python\Python38\Scripts\snapchat-dl.exe\__main__.py", line 7, in <module>
  File "c:\python\python38\lib\site-packages\snapchat_dl\app.py", line 57, in main
    download_users(usernames)
  File "c:\python\python38\lib\site-packages\snapchat_dl\app.py", line 52, in download_users
    downlaoder.download(username)
  File "c:\python\python38\lib\site-packages\snapchat_dl\snapchat_dl.py", line 81, in download
    stories, snap_user = self._web_fetch_story(username)
  File "c:\python\python38\lib\site-packages\snapchat_dl\snapchat_dl.py", line 68, in _web_fetch_story
    raise APIResponseError
snapchat_dl.utils.APIResponseError

[Feature Request] Downloading Stories and Spotlight vids/pics saved by creator in their Public Profile page

  • Snapchat Downloader version: Latest. 1.4.3
  • Python version: 3.7.9
  • Operating System: Windows 7 64bit

Description

Certain public profiles have some Stories and Spotlight videos/pictures saved by creator, which are viewable without subscription or account. E.g. https://www.snapchat.com/add/izzygreenof

1234567

Would you please make it possible to add option to download those Stories/Spotlight vids/pics too, not just the most recent stories from the past 24 hours?

What I Did

snapchat-dl izzygreenof
2022-08-26 16:21:27.896 | INFO     | snapchat_dl.snapchat_dl:download:97 - izzygreenof has no stories

So downloading those videos/pictures mentioned before is not working

Stories not downloading randomly

  • Snapchat Downloader version: 1.2.1
  • Python version: 3.9.7
  • Operating System: Android 11 / Termux

Description

Scrape stories from a public profile

What I Did

snapchat-dl gima_ashi
| INFO | snapchat_dl.snapchat_dl:download:75 - 
gima_ashi has no stories

Take her for example. She has 24 stories today, when I run the command above I can't download them. But I'm able to grab using 1DM.

Doesn't work, it hangs up

When I give the link, I write snapchat-dl “https://story.snapchat.com/s/ story I want.

In the output it says that this following user has, for example, 10 stories. After that no more happens. Neither the program reports nor the terminal aborts the process. Also the option with "-c". It says there that this user suddenly has no more stories ?!

I also had difficulty finding the program after "pip3 install snapchat-dl", because it was not in / usr / local / bin but in /Library/Frameworks/Python.framework/Versions/3.6/bin/snapchat-dl.

Even if it has a few bugs it is still a great program, especially because I don't have to keep entering python3 snapchat-dl, but it runs as cleanly as "youtube-dl". The parameters are also kept very nice.

Do you think it is also possible to download the story from private people by logging into your account?

download error

  • Snapchat Downloader version: 1.0.0
  • Python version: 3.8
  • Operating System: Windows 10 x64

Description

Gives HTTPSConnectionPool(host='s.sc-cdn.net', port=443): Read timed out.

Make it possible to download ALL stories.

  • Snapchat Downloader version: Latest. 1.4.3
  • Python version: 3.10
  • Operating System: Windows 10

Description

Currently on Snapchat there are 2 kinds of stories.
One where you have to open their actual profile and view a story, one where you click on their tag and view a story. The second one doesn't have an "actual" profile. Both both of them are 100% public stories. But for some reason only the first one can be downloaded with this snapchat-dl.
You can only download stories from users that have a "Public Profile"
You should be able to download the other one too because it doesn't require you to add someone or anything. Literally anyone can see their story.

What I Did

snapchat-dl lila.v12

2022-03-24 05:39:45.892 | INFO | snapchat_dl.snapchat_dl:download:97 - lila.v12 has no stories

image
Clearly it is wrong. There is a story there and I can view it without them being my friend or anything.

Great program though. It's just annoying when majority of stories don't have Public Profile set up.

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.