@@ -148,6 +148,38 @@ function getScrapperOptionsByUrl(url: string, title: string) {
148
148
}
149
149
}
150
150
151
+ if ( url . includes ( 'yellowpages.com/search' ) ) {
152
+ return {
153
+ header : title ,
154
+ listElementsQuery : '.result' ,
155
+ elementParser : [
156
+ { title : 'Logo' , query : 'img' , type : 'image' } ,
157
+ { title : 'Name' , query : '.business-name' , type : 'text' } ,
158
+ { title : 'Phone number' , query : '.phone' , type : 'text' } ,
159
+ { title : 'Address' , query : '.adr' , type : 'text' } ,
160
+ { title : 'Categories' , query : '.categories' , type : 'text' } ,
161
+ { title : 'Website' , query : '.track-visit-website' , type : 'link' }
162
+ ]
163
+ }
164
+ }
165
+
166
+ if ( url . includes ( 'yelp.com/search' ) ) {
167
+ return {
168
+ header : title ,
169
+ listElementsQuery : '[data-testid="serp-ia-card"]' ,
170
+ elementParser : [
171
+ { title : 'Image' , query : 'img' , type : 'image' } ,
172
+ { title : 'Name' , query : '[class*="businessName_"]' , type : 'text' } ,
173
+ { title : 'Rating' , query : 'span[data-font-weight="semibold"]' , type : 'text' } ,
174
+ { title : 'Categories' , query : '[class*="priceCategory"]' , type : 'text' } ,
175
+ { title : 'Yelp link' , query : '[class*="businessName_"] a' , type : 'clean-url' }
176
+ ]
177
+ }
178
+ }
179
+
180
+
181
+ //
182
+
151
183
return null ;
152
184
}
153
185
0 commit comments