Update server.js
Browse files
server.js
CHANGED
|
@@ -12,7 +12,16 @@ async function scrapeUK(page = 1) {
|
|
| 12 |
? "https://getsms.cc/temporary-phone-numbers/UK"
|
| 13 |
: `https://getsms.cc/temporary-phone-numbers/UK/${page}`;
|
| 14 |
|
| 15 |
-
const { data } = await axios.get(url
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
const $ = cheerio.load(data);
|
| 17 |
|
| 18 |
const results = [];
|
|
|
|
| 12 |
? "https://getsms.cc/temporary-phone-numbers/UK"
|
| 13 |
: `https://getsms.cc/temporary-phone-numbers/UK/${page}`;
|
| 14 |
|
| 15 |
+
const { data } = await axios.get(url, {
|
| 16 |
+
headers: {
|
| 17 |
+
"User-Agent":
|
| 18 |
+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
| 19 |
+
"Accept":
|
| 20 |
+
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
| 21 |
+
"Accept-Language": "en-US,en;q=0.9",
|
| 22 |
+
},
|
| 23 |
+
});
|
| 24 |
+
|
| 25 |
const $ = cheerio.load(data);
|
| 26 |
|
| 27 |
const results = [];
|