Remove a now-unused script for downloading from Instagram
- ID
de5ebc1- date
2024-08-12 20:33:27+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
bc78aa6- message
Remove a now-unused script for downloading from Instagram- changed files
4 files, 2 additions, 49 deletions
Changed files
requirements.in (293) → requirements.in (281)
diff --git a/requirements.in b/requirements.in
index 0451412..0f32e4c 100644
--- a/requirements.in
+++ b/requirements.in
@@ -7,7 +7,6 @@ datasette-render-image-tags
httpx
humanize
hyperlink
-instaloader
keyring
naturalsort==1.5.1 # Used as 'natsort'
Pillow
requirements.txt (3768) → requirements.txt (3691)
diff --git a/requirements.txt b/requirements.txt
index 91578d4..f02b957 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -77,8 +77,6 @@ idna==3.6
# requests
iniconfig==2.0.0
# via pytest
-instaloader==4.10.3
- # via -r requirements.in
itsdangerous==2.1.2
# via
# asgi-csrf
@@ -155,9 +153,7 @@ python-multipart==0.0.6
pyyaml==6.0.1
# via datasette
requests==2.31.0
- # via
- # instaloader
- # yt-dlp
+ # via yt-dlp
ruff==0.5.7
# via -r requirements.in
s3transfer==0.10.2
web/README.md (3860) → web/README.md (3474)
diff --git a/web/README.md b/web/README.md
index 4dde891..bcd8b3b 100644
--- a/web/README.md
+++ b/web/README.md
@@ -18,12 +18,6 @@ folder_name = "web"
scripts = [
{
- "usage": "download_instagram.py [POST_URL]",
- "description": """
- download the photos from an Instagram post.
- """
- },
- {
"name": "imdown",
"description": """
I run this when my Internet connection goes down, and it makes an audible "ping" when it comes back up.
@@ -66,15 +60,6 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
]]]-->
<dl>
<dt>
- <a href="https://github.com/alexwlchan/scripts/blob/main/web/download_instagram.py">
- <code>download_instagram.py [POST_URL]</code>
- </a>
- </dt>
- <dd>
- download the photos from an Instagram post.
- </dd>
-
- <dt>
<a href="https://github.com/alexwlchan/scripts/blob/main/web/imdown">
<code>imdown</code>
</a>
@@ -128,4 +113,4 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
this is a wrapper around <a href="https://github.com/yt-dlp/yt-dlp">yt-dlp</a> that does parallel downloads of videos in playlists.
</dd>
</dl>
-<!-- [[[end]]] (checksum: 52d8c9f27f76e4f1eb6f63952ee3b9b6) -->
+<!-- [[[end]]] (checksum: cc21e25a1a69ea0dea3a50dd8737ec2d) -->
web/download_instagram.py (547) → web/download_instagram.py (0)
diff --git a/web/download_instagram.py b/web/download_instagram.py
deleted file mode 100755
index 7d97889..0000000
--- a/web/download_instagram.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python3
-"""
-Download the photos from an Instagram post.
-"""
-
-import sys
-
-import hyperlink
-import instaloader
-
-
-if __name__ == "__main__":
- try:
- url = sys.argv[1]
- except IndexError:
- sys.exit(f"Usage: {__file__} <URL>")
-
- url = hyperlink.DecodedURL.from_text(url)
-
- assert url.host == "www.instagram.com", url
- assert url.path[0] == "p", url
-
- post_id = url.path[1]
-
- L = instaloader.Instaloader()
- post = instaloader.Post.from_shortcode(L.context, post_id)
- L.download_post(post, post_id)