Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -111,7 +111,10 @@ def get_comments(news_url):
|
|
111 |
return title.text.strip(), article.text.strip(), processing_data(json_data['result']['commentList'])
|
112 |
else if ('insta' in news_url):
|
113 |
list = news_url.split('/')
|
114 |
-
|
|
|
|
|
|
|
115 |
L = instaloader.Instaloader()
|
116 |
post = Post.from_shortcode(L.context, pid)
|
117 |
|
|
|
111 |
return title.text.strip(), article.text.strip(), processing_data(json_data['result']['commentList'])
|
112 |
else if ('insta' in news_url):
|
113 |
list = news_url.split('/')
|
114 |
+
if list[-1]:
|
115 |
+
pid = list[-1]
|
116 |
+
else:
|
117 |
+
pid = list[-2]
|
118 |
L = instaloader.Instaloader()
|
119 |
post = Post.from_shortcode(L.context, pid)
|
120 |
|