[twitter] force HTTPS for TwitPic URLs
This commit is contained in:
@@ -221,7 +221,8 @@ class TwitterExtractor(Extractor):
|
|||||||
for url in tweet["entities"].get("urls", ()):
|
for url in tweet["entities"].get("urls", ()):
|
||||||
url = url["expanded_url"]
|
url = url["expanded_url"]
|
||||||
if "//twitpic.com/" in url and "/photos/" not in url:
|
if "//twitpic.com/" in url and "/photos/" not in url:
|
||||||
response = self.request(url, fatal=False)
|
response = self.request(
|
||||||
|
url.replace("http:", "https:", 1), fatal=False)
|
||||||
if response.status_code >= 400:
|
if response.status_code >= 400:
|
||||||
continue
|
continue
|
||||||
url = text.extr(
|
url = text.extr(
|
||||||
|
|||||||
Reference in New Issue
Block a user