|
@@ -86,6 +86,8 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
|
86
|
86
|
else:
|
87
|
87
|
m = re.search('<img src="([^"]+)', r2)
|
88
|
88
|
img = m.group(1) if m else ""
|
|
89
|
+ if img.startswith("//"):
|
|
90
|
+ img = "http:" + img
|
89
|
91
|
m = re.search('<span class="playlist-overlay">([^<]+)</span>', r2)
|
90
|
92
|
overlay = m.group(1) if m else ""
|
91
|
93
|
m = re.search('<span class="badge badge-[^>]+>([^<]+)(<[^>]+>([^<]+))*</span>', r2, re.IGNORECASE)
|
|
@@ -145,6 +147,8 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
|
145
|
147
|
if categories:
|
146
|
148
|
tite = "%s [%s]"%(title,categories)
|
147
|
149
|
img = re.search('<meta property="twitter:image" content="([^"]+)">', r, re.IGNORECASE | re.DOTALL).group(1)
|
|
150
|
+ if img.startswith("//"):
|
|
151
|
+ img = "http:" + img
|
148
|
152
|
desc = title + "\n" + re.search('<meta property="og:description" content="([^"]+)">', r, re.IGNORECASE | re.DOTALL).group(1)
|
149
|
153
|
m = re.search('file: "([^"]+)"', r, re.IGNORECASE)
|
150
|
154
|
if m:
|
|
@@ -201,5 +205,8 @@ if __name__ == "__main__":
|
201
|
205
|
import run
|
202
|
206
|
source = Source()
|
203
|
207
|
data= sys.argv[1] if len(sys.argv)>1 else source.name+"::home"
|
204
|
|
- run.run(source, data)
|
|
208
|
+ if len(sys.argv) > 2:
|
|
209
|
+ run.run_cli(source, data)
|
|
210
|
+ else:
|
|
211
|
+ run.run(source, data)
|
205
|
212
|
sys.exit()
|