atlas-obscura-api 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -8
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { parse } from "node-html-parser";
|
|
2
2
|
import { gotScraping } from "got-scraping";
|
|
3
|
-
|
|
4
3
|
//#region src/fetchers/index.ts
|
|
5
4
|
const fetchPage = async (url, headersCustom) => {
|
|
6
5
|
try {
|
|
@@ -30,7 +29,6 @@ const fetchPage = async (url, headersCustom) => {
|
|
|
30
29
|
return "Error";
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
|
-
|
|
34
32
|
//#endregion
|
|
35
33
|
//#region src/utils.ts
|
|
36
34
|
const parseResults = (matches) => {
|
|
@@ -42,14 +40,12 @@ const parseResults = (matches) => {
|
|
|
42
40
|
}
|
|
43
41
|
return locations;
|
|
44
42
|
};
|
|
45
|
-
|
|
46
43
|
//#endregion
|
|
47
44
|
//#region src/vars.ts
|
|
48
45
|
const URL_PLACES_ALL = "https://www.atlasobscura.com/articles/all-places-in-the-atlas-on-one-map";
|
|
49
46
|
const urlSearch = (coord, page) => `https://www.atlasobscura.com/search?utf8=%E2%9C%93&q=&location=&nearby=true&lat=${coord.lat}&lng=${coord.lng}${page ? "&page=" + page : ""}`;
|
|
50
47
|
const urlPlaceId = (id) => `https://www.atlasobscura.com/places/${id}.json?place_only=1`;
|
|
51
48
|
const urlUser = (name) => `https://www.atlasobscura.com/users/${name}`;
|
|
52
|
-
|
|
53
49
|
//#endregion
|
|
54
50
|
//#region src/services/location.service.ts
|
|
55
51
|
var PlacesScraper = class {
|
|
@@ -101,7 +97,6 @@ var PlacesScraper = class {
|
|
|
101
97
|
return parseResults(parse(await fetchPage(urlUser(user), options?.headers)).innerHTML.match(/AtlasObscura\.user_profile = (.*?);/)).user;
|
|
102
98
|
}
|
|
103
99
|
};
|
|
104
|
-
|
|
105
100
|
//#endregion
|
|
106
101
|
//#region src/index.ts
|
|
107
102
|
var AtlasObscura = class {
|
|
@@ -129,9 +124,8 @@ var AtlasObscura = class {
|
|
|
129
124
|
return this.locationService.user(user, options);
|
|
130
125
|
}
|
|
131
126
|
};
|
|
132
|
-
const
|
|
133
|
-
const atlasObscura = new AtlasObscura(locationScraper);
|
|
134
|
-
|
|
127
|
+
const atlasObscura = new AtlasObscura(new PlacesScraper());
|
|
135
128
|
//#endregion
|
|
136
129
|
export { AtlasObscura, atlasObscura };
|
|
130
|
+
|
|
137
131
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/fetchers/index.ts","../src/utils.ts","../src/vars.ts","../src/services/location.service.ts","../src/index.ts"],"sourcesContent":["import { gotScraping } from 'got-scraping';\n\nexport const fetchPage = async (url: string, headersCustom?: Record<string, string>): Promise<string> => {\n try {\n const response = await gotScraping({\n url,\n // Configuration to mimic a modern desktop browser (Chrome/Firefox)\n headerGeneratorOptions: {\n browsers: [\n { name: 'chrome', minVersion: 115 },\n { name: 'firefox', minVersion: 115 }\n ],\n devices: ['desktop'],\n locales: ['en-US'],\n operatingSystems: ['windows', 'macos'],\n },\n headers: {\n 'Cache-Control': 'no-cache',\n ...headersCustom,\n },\n // Optional: HTTP2 is often faster and less suspicious for modern sites,\n // but sometimes causes stability issues. Try true if false doesn't work.\n http2: true,\n });\n\n return response.body;\n\n } catch (error: any) {\n // Better error logging to debug 403s\n if (error.response) {\n console.error(`atlas-obscura-api: Request failed with status code ${error.response.statusCode} for url: ${url}`);\n } else {\n console.error('fetchPage error:', error.message);\n }\n\n return 'Error';\n }\n};","export const parseResults = <T>(matches: RegExpMatchArray): T => {\n let locations: T = null;\n\n if (matches && matches[1]?.length) {\n try {\n locations = JSON.parse(matches[1]);\n } catch (error) {\n console.error('Error parsing all places');\n }\n }\n return locations;\n};\n","export const URL_PLACES_ALL =\n 'https://www.atlasobscura.com/articles/all-places-in-the-atlas-on-one-map';\n\nexport const urlSearch = (coord: { lat: number; lng: number }, page?: number): string =>\n `https://www.atlasobscura.com/search?utf8=%E2%9C%93&q=&location=&nearby=true&lat=${coord.lat\n }&lng=${coord.lng}${page ? '&page=' + page : ''}`;\n\nexport const urlPlaceId = (id: number): string =>\n `https://www.atlasobscura.com/places/${id}.json?place_only=1`;\n\nexport const urlUser = (name: string): string =>\n `https://www.atlasobscura.com/users/${name}`;\n","import { parse } from 'node-html-parser';\nimport { fetchPage } from '../fetchers/index.js';\nimport { AOUser } from '../interfaces/user.interface.js';\nimport { parseResults } from '../utils.js';\nimport { URL_PLACES_ALL, urlPlaceId, urlSearch, urlUser } from '../vars.js';\nimport { AOCoordinates, AOFetchOptions } from './../interfaces/global.js';\nimport { AOLocationResult } from './../interfaces/locations.interface.js';\nimport { AOPlaceExtend, AOPlaceShort } from './../interfaces/placeId.interface.js';\nimport { AOPlacesAll } from './../interfaces/places-all.interface.js';\n\nexport class PlacesScraper {\n public async placesAll(options?: AOFetchOptions): Promise<AOPlacesAll[]> {\n const response = await fetchPage(URL_PLACES_ALL, options?.headers);\n const html = parse(response).innerHTML;\n\n const data = html.match(/AtlasObscura\\.all_places = (.*?);/);\n\n return parseResults<AOPlacesAll[]>(data);\n }\n\n public async search(coords: AOCoordinates, page = 1, options?: AOFetchOptions): Promise<AOLocationResult> {\n const url = urlSearch(coords, page);\n const response = await fetchPage(url, options?.headers);\n const html = parse(response).innerHTML;\n\n const data = html.match(/AtlasObscura\\.place_search = (.*?);/);\n\n return parseResults<AOLocationResult>(data);\n }\n\n public async placeByIdShort(id: number, options?: AOFetchOptions): Promise<AOPlaceShort> {\n const url = urlPlaceId(id);\n const data = await fetchPage(url, options?.headers);\n\n let place: AOPlaceShort = null;\n\n try {\n place = JSON.parse(data);\n if (place && typeof place.hide_from_maps === 'string') {\n (place as any).hide_from_maps = place.hide_from_maps === 'true';\n }\n } catch (error) {\n console.error('Error parsing placeById', id);\n }\n return place;\n }\n\n public async placeFull(url: string, options?: AOFetchOptions): Promise<AOPlaceExtend> {\n const data = await fetchPage(url, options?.headers);\n const html = parse(data);\n\n const descriptions = html.querySelectorAll('.place-body p').map((p) => p.innerHTML);\n\n const sectionDirections = Array.from(html.querySelectorAll('section')).find((sec) => {\n const h2 = sec.querySelector('h2');\n return h2 && h2.textContent.trim() === 'Know Before You Go';\n });\n const directions = sectionDirections\n ? Array.from(sectionDirections.querySelectorAll('p')).map((p) => p.textContent.trim())\n : [];\n\n const tags = html.querySelectorAll('.aon-pill-badge-component').map((x) => {\n return {\n title: x.querySelector('.aon-pill-badge-text')?.innerHTML.trim(),\n link: x.attributes.href\n };\n });\n\n const slides = html.querySelectorAll('.swiper-slide');\n const images = Array.from(slides)\n .map((slide) => {\n const img = slide.querySelector('img');\n return img ? img.getAttribute('src') : null;\n })\n .filter(Boolean);\n\n const imageCover = images[0];\n\n return { description: descriptions, directions, tags, imageCover, images };\n }\n\n public async user(user: string, options?: AOFetchOptions): Promise<AOUser> {\n const url = urlUser(user);\n const response = await fetchPage(url, options?.headers);\n const html = parse(response).innerHTML;\n\n const data = html.match(/AtlasObscura\\.user_profile = (.*?);/);\n\n const usr = parseResults<{ user: AOUser }>(data);\n\n return usr.user;\n }\n}\n","import { AOCoordinates, AOFetchOptions } from './interfaces/global.js';\nimport { AOLocationResult } from './interfaces/locations.interface.js';\nimport { AOPlace, AOPlaceShort } from './interfaces/placeId.interface.js';\nimport { AOPlacesAll } from './interfaces/places-all.interface.js';\nimport { AOUser } from './interfaces/user.interface.js';\nimport { PlacesScraper } from './services/location.service.js';\n\nexport class AtlasObscura {\n constructor(private locationService: PlacesScraper) { }\n\n public async search(coords: AOCoordinates, options?: AOFetchOptions): Promise<AOLocationResult> {\n return this.locationService.search(coords, 1, options);\n }\n\n public async placesAll(options?: AOFetchOptions): Promise<AOPlacesAll[]> {\n return this.locationService.placesAll(options);\n }\n\n public async placeShort(id: number, options?: AOFetchOptions): Promise<AOPlaceShort> {\n return this.locationService.placeByIdShort(id, options);\n }\n\n public async placeFull(id: number, options?: AOFetchOptions): Promise<AOPlace> {\n const place = await this.locationService.placeByIdShort(id, options);\n const placeRich = await this.locationService.placeFull(place.url, options);\n return { ...place, ...placeRich };\n }\n\n public async user(user: string, options?: AOFetchOptions): Promise<AOUser> {\n return this.locationService.user(user, options);\n }\n}\n\nconst locationScraper = new PlacesScraper();\nexport const atlasObscura: AtlasObscura = new AtlasObscura(locationScraper);\nexport type * from './interfaces/index.js';\n"],"mappings":";;;;AAEA,MAAa,YAAY,OAAO,KAAa,kBAA4D;AACvG,KAAI;AAsBF,UArBiB,MAAM,YAAY;GACjC;GAEA,wBAAwB;IACtB,UAAU,CACR;KAAE,MAAM;KAAU,YAAY;KAAK,EACnC;KAAE,MAAM;KAAW,YAAY;KAAK,CACrC;IACD,SAAS,CAAC,UAAU;IACpB,SAAS,CAAC,QAAQ;IAClB,kBAAkB,CAAC,WAAW,QAAQ;IACvC;GACD,SAAS;IACP,iBAAiB;IACjB,GAAG;IACJ;GAGD,OAAO;GACR,CAAC,EAEc;UAET,OAAY;AAEnB,MAAI,MAAM,SACR,SAAQ,MAAM,sDAAsD,MAAM,SAAS,WAAW,YAAY,MAAM;MAEhH,SAAQ,MAAM,oBAAoB,MAAM,QAAQ;AAGlD,SAAO;;;;;;ACnCX,MAAa,gBAAmB,YAAiC;CAC/D,IAAI,YAAe;AAEnB,KAAI,WAAW,QAAQ,IAAI,OACzB,KAAI;AACF,cAAY,KAAK,MAAM,QAAQ,GAAG;UAC3B,OAAO;AACd,UAAQ,MAAM,2BAA2B;;AAG7C,QAAO;;;;;ACVT,MAAa,iBACX;AAEF,MAAa,aAAa,OAAqC,SAC7D,mFAAmF,MAAM,IACxF,OAAO,MAAM,MAAM,OAAO,WAAW,OAAO;AAE/C,MAAa,cAAc,OACzB,uCAAuC,GAAG;AAE5C,MAAa,WAAW,SACtB,sCAAsC;;;;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AK,iBAAiB,gBAAgB;EACrD,MAAM,SAAS,MAAM,KAAK,OAAO,CAC9B,KAAK,UAAU;GACd,MAAM,MAAM,MAAM,cAAc,MAAM;AACtC,UAAO,MAAM,IAAI,aAAa,MAAM,GAAG;IACvC,CACD,OAAO,QAAQ;AAIlB,SAAO;GAAE,aAAa;GAAc;GAAY;GAAM,YAFnC,OAAO;GAEwC;GAAQ;;CAG5E,MAAa,KAAK,MAAc,SAA2C;AASzE,SAFY,aAJC,MADI,MAAM,UADX,QAAQ,KAAK,EACa,SAAS,QAAQ,CAC3B,CAAC,UAEX,MAAM,sCAAsC,CAEd,CAErC;;;;;;ACnFf,IAAa,eAAb,MAA0B;CACxB,YAAY,AAAQ,iBAAgC;EAAhC;;CAEpB,MAAa,OAAO,QAAuB,SAAqD;AAC9F,SAAO,KAAK,gBAAgB,OAAO,QAAQ,GAAG,QAAQ;;CAGxD,MAAa,UAAU,SAAkD;AACvE,SAAO,KAAK,gBAAgB,UAAU,QAAQ;;CAGhD,MAAa,WAAW,IAAY,SAAiD;AACnF,SAAO,KAAK,gBAAgB,eAAe,IAAI,QAAQ;;CAGzD,MAAa,UAAU,IAAY,SAA4C;EAC7E,MAAM,QAAQ,MAAM,KAAK,gBAAgB,eAAe,IAAI,QAAQ;EACpE,MAAM,YAAY,MAAM,KAAK,gBAAgB,UAAU,MAAM,KAAK,QAAQ;AAC1E,SAAO;GAAE,GAAG;GAAO,GAAG;GAAW;;CAGnC,MAAa,KAAK,MAAc,SAA2C;AACzE,SAAO,KAAK,gBAAgB,KAAK,MAAM,QAAQ;;;AAInD,MAAM,kBAAkB,IAAI,eAAe;AAC3C,MAAa,eAA6B,IAAI,aAAa,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/fetchers/index.ts","../src/utils.ts","../src/vars.ts","../src/services/location.service.ts","../src/index.ts"],"sourcesContent":["import { gotScraping } from 'got-scraping';\n\nexport const fetchPage = async (url: string, headersCustom?: Record<string, string>): Promise<string> => {\n try {\n const response = await gotScraping({\n url,\n // Configuration to mimic a modern desktop browser (Chrome/Firefox)\n headerGeneratorOptions: {\n browsers: [\n { name: 'chrome', minVersion: 115 },\n { name: 'firefox', minVersion: 115 }\n ],\n devices: ['desktop'],\n locales: ['en-US'],\n operatingSystems: ['windows', 'macos'],\n },\n headers: {\n 'Cache-Control': 'no-cache',\n ...headersCustom,\n },\n // Optional: HTTP2 is often faster and less suspicious for modern sites,\n // but sometimes causes stability issues. Try true if false doesn't work.\n http2: true,\n });\n\n return response.body;\n\n } catch (error: any) {\n // Better error logging to debug 403s\n if (error.response) {\n console.error(`atlas-obscura-api: Request failed with status code ${error.response.statusCode} for url: ${url}`);\n } else {\n console.error('fetchPage error:', error.message);\n }\n\n return 'Error';\n }\n};","export const parseResults = <T>(matches: RegExpMatchArray): T => {\n let locations: T = null;\n\n if (matches && matches[1]?.length) {\n try {\n locations = JSON.parse(matches[1]);\n } catch (error) {\n console.error('Error parsing all places');\n }\n }\n return locations;\n};\n","export const URL_PLACES_ALL =\n 'https://www.atlasobscura.com/articles/all-places-in-the-atlas-on-one-map';\n\nexport const urlSearch = (coord: { lat: number; lng: number }, page?: number): string =>\n `https://www.atlasobscura.com/search?utf8=%E2%9C%93&q=&location=&nearby=true&lat=${coord.lat\n }&lng=${coord.lng}${page ? '&page=' + page : ''}`;\n\nexport const urlPlaceId = (id: number): string =>\n `https://www.atlasobscura.com/places/${id}.json?place_only=1`;\n\nexport const urlUser = (name: string): string =>\n `https://www.atlasobscura.com/users/${name}`;\n","import { parse } from 'node-html-parser';\nimport { fetchPage } from '../fetchers/index.js';\nimport { AOUser } from '../interfaces/user.interface.js';\nimport { parseResults } from '../utils.js';\nimport { URL_PLACES_ALL, urlPlaceId, urlSearch, urlUser } from '../vars.js';\nimport { AOCoordinates, AOFetchOptions } from './../interfaces/global.js';\nimport { AOLocationResult } from './../interfaces/locations.interface.js';\nimport { AOPlaceExtend, AOPlaceShort } from './../interfaces/placeId.interface.js';\nimport { AOPlacesAll } from './../interfaces/places-all.interface.js';\n\nexport class PlacesScraper {\n public async placesAll(options?: AOFetchOptions): Promise<AOPlacesAll[]> {\n const response = await fetchPage(URL_PLACES_ALL, options?.headers);\n const html = parse(response).innerHTML;\n\n const data = html.match(/AtlasObscura\\.all_places = (.*?);/);\n\n return parseResults<AOPlacesAll[]>(data);\n }\n\n public async search(coords: AOCoordinates, page = 1, options?: AOFetchOptions): Promise<AOLocationResult> {\n const url = urlSearch(coords, page);\n const response = await fetchPage(url, options?.headers);\n const html = parse(response).innerHTML;\n\n const data = html.match(/AtlasObscura\\.place_search = (.*?);/);\n\n return parseResults<AOLocationResult>(data);\n }\n\n public async placeByIdShort(id: number, options?: AOFetchOptions): Promise<AOPlaceShort> {\n const url = urlPlaceId(id);\n const data = await fetchPage(url, options?.headers);\n\n let place: AOPlaceShort = null;\n\n try {\n place = JSON.parse(data);\n if (place && typeof place.hide_from_maps === 'string') {\n (place as any).hide_from_maps = place.hide_from_maps === 'true';\n }\n } catch (error) {\n console.error('Error parsing placeById', id);\n }\n return place;\n }\n\n public async placeFull(url: string, options?: AOFetchOptions): Promise<AOPlaceExtend> {\n const data = await fetchPage(url, options?.headers);\n const html = parse(data);\n\n const descriptions = html.querySelectorAll('.place-body p').map((p) => p.innerHTML);\n\n const sectionDirections = Array.from(html.querySelectorAll('section')).find((sec) => {\n const h2 = sec.querySelector('h2');\n return h2 && h2.textContent.trim() === 'Know Before You Go';\n });\n const directions = sectionDirections\n ? Array.from(sectionDirections.querySelectorAll('p')).map((p) => p.textContent.trim())\n : [];\n\n const tags = html.querySelectorAll('.aon-pill-badge-component').map((x) => {\n return {\n title: x.querySelector('.aon-pill-badge-text')?.innerHTML.trim(),\n link: x.attributes.href\n };\n });\n\n const slides = html.querySelectorAll('.swiper-slide');\n const images = Array.from(slides)\n .map((slide) => {\n const img = slide.querySelector('img');\n return img ? img.getAttribute('src') : null;\n })\n .filter(Boolean);\n\n const imageCover = images[0];\n\n return { description: descriptions, directions, tags, imageCover, images };\n }\n\n public async user(user: string, options?: AOFetchOptions): Promise<AOUser> {\n const url = urlUser(user);\n const response = await fetchPage(url, options?.headers);\n const html = parse(response).innerHTML;\n\n const data = html.match(/AtlasObscura\\.user_profile = (.*?);/);\n\n const usr = parseResults<{ user: AOUser }>(data);\n\n return usr.user;\n }\n}\n","import { AOCoordinates, AOFetchOptions } from './interfaces/global.js';\nimport { AOLocationResult } from './interfaces/locations.interface.js';\nimport { AOPlace, AOPlaceShort } from './interfaces/placeId.interface.js';\nimport { AOPlacesAll } from './interfaces/places-all.interface.js';\nimport { AOUser } from './interfaces/user.interface.js';\nimport { PlacesScraper } from './services/location.service.js';\n\nexport class AtlasObscura {\n constructor(private locationService: PlacesScraper) { }\n\n public async search(coords: AOCoordinates, options?: AOFetchOptions): Promise<AOLocationResult> {\n return this.locationService.search(coords, 1, options);\n }\n\n public async placesAll(options?: AOFetchOptions): Promise<AOPlacesAll[]> {\n return this.locationService.placesAll(options);\n }\n\n public async placeShort(id: number, options?: AOFetchOptions): Promise<AOPlaceShort> {\n return this.locationService.placeByIdShort(id, options);\n }\n\n public async placeFull(id: number, options?: AOFetchOptions): Promise<AOPlace> {\n const place = await this.locationService.placeByIdShort(id, options);\n const placeRich = await this.locationService.placeFull(place.url, options);\n return { ...place, ...placeRich };\n }\n\n public async user(user: string, options?: AOFetchOptions): Promise<AOUser> {\n return this.locationService.user(user, options);\n }\n}\n\nconst locationScraper = new PlacesScraper();\nexport const atlasObscura: AtlasObscura = new AtlasObscura(locationScraper);\nexport type * from './interfaces/index.js';\n"],"mappings":";;;AAEA,MAAa,YAAY,OAAO,KAAa,kBAA4D;AACvG,KAAI;AAsBF,UArBiB,MAAM,YAAY;GACjC;GAEA,wBAAwB;IACtB,UAAU,CACR;KAAE,MAAM;KAAU,YAAY;KAAK,EACnC;KAAE,MAAM;KAAW,YAAY;KAAK,CACrC;IACD,SAAS,CAAC,UAAU;IACpB,SAAS,CAAC,QAAQ;IAClB,kBAAk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CAGhD,MAAa,WAAW,IAAY,SAAiD;AACnF,SAAO,KAAK,gBAAgB,eAAe,IAAI,QAAQ;;CAGzD,MAAa,UAAU,IAAY,SAA4C;EAC7E,MAAM,QAAQ,MAAM,KAAK,gBAAgB,eAAe,IAAI,QAAQ;EACpE,MAAM,YAAY,MAAM,KAAK,gBAAgB,UAAU,MAAM,KAAK,QAAQ;AAC1E,SAAO;GAAE,GAAG;GAAO,GAAG;GAAW;;CAGnC,MAAa,KAAK,MAAc,SAA2C;AACzE,SAAO,KAAK,gBAAgB,KAAK,MAAM,QAAQ;;;AAKnD,MAAa,eAA6B,IAAI,aADtB,IAAI,eAAe,CACgC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atlas-obscura-api",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Atlas Obscura API in JavaScript. NPM library for scrapping atlasobscura.com",
|
|
5
5
|
"author": "BART! <bart@bartweb.cz>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"got-scraping": "^4.2.
|
|
9
|
-
"node-html-parser": "^7.0
|
|
8
|
+
"got-scraping": "^4.2.1",
|
|
9
|
+
"node-html-parser": "^7.1.0"
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"url": "git+https://github.com/bartholomej/atlas-obscura-api.git",
|