Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
kduffie committed Feb 17, 2020
1 parent 2f53ce0 commit b4fff30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/best-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,14 @@ function getBestAltImage(fullUrl, query, scoreFn, callback) {

LOGR.debug("GET IMAGES FOR " + fullUrl + ":" + query);

const options = {
url: fullUrl,
headers: {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15'
}
};
// load the destination page
request.get(fullUrl, function (error, response, body) {
request.get(options, function (error, response, body) {

// bail out if there was an error
if (error || (response.statusCode && response.statusCode !== 200)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "best-image",
"version": "2.0.11",
"version": "2.0.12",
"description": "Library that will retrieve an HTML document (by URL) and return the best image from the page to represent the document",
"main": "lib/best-image.js",
"scripts": {
Expand Down

0 comments on commit b4fff30

Please sign in to comment.