skyme5 / snapchat-dl Goto Github PK
View Code? Open in Web Editor NEWSnapchat Public Story Downloader
License: MIT License
Snapchat Public Story Downloader
License: MIT License
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?
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
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?
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
Sometimes stories get downloaded but they're not valid media files. Account is public.
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
Is it possible to download single story from a public URL ? For instance: https://story.snapchat.com/p/d9fb75ab-5ba2-438d-bab5-5dfed20ab5b5/2407100062339072
I can download all stories from one user but I can't find the option for download a single story.
snapchat-dl https://story.snapchat.com/p/d9fb75ab-5ba2-438d-bab5-5dfed20ab5b5/2407100062339072
Attempting to download stories succeeds, however no media is saved to disk. The folder is empty.
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
CodeFactor found an issue: Expression "open('test_dl_23.mp4', 'a').close" is assigned to nothing
It's currently on:
tests\test_downlaoder.py:28
CodeFactor found an issue: String statement has no effect
It's currently on:
snapchat_dl\app.py:40
Using the latest versions of Python, PiOS, and Snapchat-dl. Happens on other OS's too
Describe what you were trying to get done:
Download a story of a public Snapchat user.
Tell us what happened, what went wrong, and what you expected to happen.
It errored out and failed instead of downloading. I also tried a different IP
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
snapchat-dl publicsnapchatuser
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1045, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xb5b26f70>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 788, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='story.snapchat.com', port=443): Max retries exceeded with url: /@publicsnapchatuser (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb5b26f70>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/username/.local/bin/snapchat-dl", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/username/.local/lib/python3.11/site-packages/snapchat_dl/app.py", line 58, in main
download_users(usernames)
File "/home/username/.local/lib/python3.11/site-packages/snapchat_dl/app.py", line 53, in download_users
downlaoder.download(username)
File "/home/username/.local/lib/python3.11/site-packages/snapchat_dl/snapchat_dl.py", line 93, in download
stories, snap_user = self._web_fetch_story(username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/username/.local/lib/python3.11/site-packages/snapchat_dl/snapchat_dl.py", line 59, in _web_fetch_story
response = self._api_response(username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/username/.local/lib/python3.11/site-packages/snapchat_dl/snapchat_dl.py", line 45, in _api_response
return requests.get(web_url).text
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='story.snapchat.com', port=443): Max retries exceeded with url: /@publicsnapchatuser (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb5b26f70>: Failed to establish a new connection: [Errno 111] Connection refused'))
Gives HTTPSConnectionPool(host='s.sc-cdn.net', port=443): Read timed out.
KeyError is raised when downloading stories.
KeyError: "snaps"
CodeFactor found an issue: Unnecessary pass statement
It's currently on:
snapchat_dl\utils.py:13
Getting snapchat_dl.utils.APIResponseError
$> 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
Add support for story urls with new formt https://story.snapchat.com/@username
The exception NoStoriesAvailable
is not handled correctly.
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.
snapchat-dl lila.v12
2022-03-24 05:39:45.892 | INFO | snapchat_dl.snapchat_dl:download:97 - lila.v12 has no stories
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.
Scrape stories from a public profile
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.
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.