mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-13 05:01:03 +00:00
Update http.js
This commit is contained in:
parent
7babc6bad7
commit
d413cb49b4
|
@ -1,4 +1,4 @@
|
||||||
`// http.js
|
// http.js
|
||||||
// HTTP REST Client for WelsonJS framework
|
// HTTP REST Client for WelsonJS framework
|
||||||
// Namhyeon Go (Catswords Research) <abuse@catswords.net>
|
// Namhyeon Go (Catswords Research) <abuse@catswords.net>
|
||||||
// https://github.com/gnh1201/welsonjs
|
// https://github.com/gnh1201/welsonjs
|
||||||
|
@ -499,9 +499,12 @@ var HTTPObject = function(engine) {
|
||||||
|
|
||||||
this.parseSerpUrl = function(url) {
|
this.parseSerpUrl = function(url) {
|
||||||
var getEngine = function(url) {
|
var getEngine = function(url) {
|
||||||
var match = url.match(/(?:https?:\/\/)?(?:www\.)?(google|youtube|bing|baidu|amazon)\.\w+/), result;
|
var match = url.match(/(?:https?:\/\/)?(?:www\.)?(google|youtube|bing|baidu|amazon|naver|daum)\.\w+/), result;
|
||||||
if (match) {
|
if (match) {
|
||||||
result = match[1];
|
result = match[1];
|
||||||
|
if (result == "naver" || result == "daum") {
|
||||||
|
result = "google";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
result = "google";
|
result = "google";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user