Warning when trying to fetch non-HTML response in fetchHTML
							parent
							
								
									e3b83b81c8
								
							
						
					
					
						commit
						9ff4d6b12f
					
				| 
						 | 
					@ -42,6 +42,11 @@ module.exports.fetchHTML = async function (url) {
 | 
				
			||||||
        shared.logger.warn(`Unable to fetch HTML for ${url}`);
 | 
					        shared.logger.warn(`Unable to fetch HTML for ${url}`);
 | 
				
			||||||
        return null;
 | 
					        return null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    else if (!response.headers["content-type"].includes("text/html")) {
 | 
				
			||||||
 | 
					        // The response is not a HTML page
 | 
				
			||||||
 | 
					        shared.logger.warn(`The ${url} returned a ${response.headers["content-type"]} response`);
 | 
				
			||||||
 | 
					        return null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    return response.data;
 | 
					    return response.data;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue