Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 34800ea

Browse files
committed
Update
1 parent 5c0b596 commit 34800ea

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

‎instapic.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
insta_post = urlopen(url)
2929
bs = BeautifulSoup(insta_post , "lxml")
3030

31-
## Find Insta Post Image
31+
## Find Insta Post Image URL
3232
metatag = bs.find("meta", {"property": "og:image"})
3333

3434
if metatag is not None:

‎instavideo.py‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env python
2+
3+
## Instagram Post Video Downloader
4+
## Install Python pip Modules
5+
6+
# Python2 (pip)
7+
## pip install wget
8+
## pip install beautifulsoup4
9+
## pip install lxml
10+
11+
# Python3 (pip)
12+
## pip3 install wget
13+
## pip3 install beautifulsoup4
14+
## pip3 install lxml
15+
16+
from bs4 import BeautifulSoup
17+
import wget
18+
19+
try: #python3
20+
from urllib.request import urlopen
21+
except: #python2
22+
from urllib2 import urlopen
23+
input = raw_input
24+
25+
## User input
26+
url = input("033円[1;32mEnter a Instagram Post URL : 033円[1;m")
27+
28+
insta_post = urlopen(url)
29+
bs = BeautifulSoup(insta_post , "lxml")
30+
31+
## Find Insta Post Video URL
32+
metatag = bs.find("meta", {"property": "og:video:secure_url"})
33+
34+
if metatag is not None:
35+
36+
print (metatag["content"])
37+
print ("\n")
38+
39+
print ("Video Started Downloading.......")
40+
41+
## Download Image via Wget
42+
filename = wget.download(metatag["content"])
43+
print ("\n")
44+
45+
print ("Done")
46+
print ("\n")
47+
48+
else:
49+
print ("Error")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /