diff --git a/apiserver/feed.py b/apiserver/feed.py index f6679de..09a29d6 100644 --- a/apiserver/feed.py +++ b/apiserver/feed.py @@ -84,8 +84,11 @@ def get_article(url): def get_content_type(url): try: - headers = {'User-Agent': 'Twitterbot/1.0'} - return requests.get(url, headers=headers, timeout=2).headers['content-type'] + headers = { + 'User-Agent': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', + 'X-Forwarded-For': '66.249.66.1', + } + return requests.get(url, headers=headers, timeout=5).headers['content-type'] except: pass diff --git a/webclient/src/Feed.js b/webclient/src/Feed.js index 75ad76e..c84f0cd 100644 --- a/webclient/src/Feed.js +++ b/webclient/src/Feed.js @@ -58,15 +58,15 @@ class Feed extends React.Component { {error &&

Connection error?

} {stories ?
- {stories.map((x, i) => -
+ {stories.map(x => +
source logo {x.title} - ​({sourceLink(x)}) + ({sourceLink(x)})
diff --git a/webclient/src/Results.js b/webclient/src/Results.js index 10a4a45..1051a11 100644 --- a/webclient/src/Results.js +++ b/webclient/src/Results.js @@ -64,15 +64,15 @@ class Results extends React.Component {

Search results:

{stories.length ? - stories.map((x, i) => -
+ stories.map(x => +
source logo {x.title} - ​({sourceLink(x)}) + ({sourceLink(x)})