You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3d8428b
Browse filesBrowse the repository at this point in the historyBrowse files
stlc-bot
committed
feat(scrape): add Yelp search parser
Merge pull request #2306 from context-dot-dev/feat/yelp-search-parser
Stainless-Generated-From: 163fdec2b765044684ae40e57cd7342cb7548a41
Copy file name to clipboardExpand all lines: src/context/dev/types/batch_get_results_response.py
+14-10Lines changed: 14 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -294,7 +294,7 @@ class DataOkResultMetadata(BaseModel):
294
294
295
295
classDataOkResultParsed(BaseModel):
296
296
"""
297
-
Custom rules return fields after content filters; unmatched fields are null ([] for lists). The google-maps parser returns business records in data.results, google-maps-reviews returns data.reviews, and the google-play parser returns one app record as data, google-play-reviews returns data.reviews, app-store and app-store-reviews do the same for the App Store, g2-reviews returns data.reviews for a G2 product, instagram-profile and instagram-post return one record as data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return one record as data, tiktok-feed returns data.videos, tiktok-comments returns data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return data.users, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read their data directly, independently of DOM filters and other outputs.
297
+
Custom rules return fields after content filters; unmatched fields are null ([] for lists). The google-maps parser returns business records in data.results, google-maps-reviews returns data.reviews, and the google-play parser returns one app record as data, google-play-reviews returns data.reviews, app-store and app-store-reviews do the same for the App Store, g2-reviews returns data.reviews for a G2 product, instagram-profile and instagram-post return one record as data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return one record as data, tiktok-feed returns data.videos, tiktok-comments returns data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return data.users, yelp-search returns up to 20 ranked organic businesses in data.businesses, plus total and pagination, from a Yelp search URL; emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read their data directly, independently of DOM filters and other outputs.
298
298
"""
299
299
300
300
data: Optional[Dict[str, object]] =None
@@ -323,6 +323,7 @@ class DataOkResultParsed(BaseModel):
323
323
"tiktok-followers",
324
324
"tiktok-following",
325
325
"tiktok-user-search",
326
+
"yelp-search",
326
327
"emails",
327
328
"phone-numbers",
328
329
"links",
@@ -522,10 +523,11 @@ class DataOkResult(BaseModel):
522
523
data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return
523
524
one record as data, tiktok-feed returns data.videos, tiktok-comments returns
524
525
data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return
525
-
data.users, emails, phone-numbers, and links return data.emails,
526
-
data.phone_numbers, and data.links from the rendered page; the store, Maps, G2,
527
-
Instagram, and TikTok parsers read their data directly, independently of DOM
528
-
filters and other outputs.
526
+
data.users, yelp-search returns up to 20 ranked organic businesses in
527
+
data.businesses, plus total and pagination, from a Yelp search URL; emails,
528
+
phone-numbers, and links return data.emails, data.phone_numbers, and data.links
529
+
from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read
530
+
their data directly, independently of DOM filters and other outputs.
529
531
"""
530
532
531
533
product: DataOkResultProduct
@@ -827,7 +829,7 @@ class DataErrorResultMetadata(BaseModel):
827
829
828
830
classDataErrorResultParsed(BaseModel):
829
831
"""
830
-
Custom rules return fields after content filters; unmatched fields are null ([] for lists). The google-maps parser returns business records in data.results, google-maps-reviews returns data.reviews, and the google-play parser returns one app record as data, google-play-reviews returns data.reviews, app-store and app-store-reviews do the same for the App Store, g2-reviews returns data.reviews for a G2 product, instagram-profile and instagram-post return one record as data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return one record as data, tiktok-feed returns data.videos, tiktok-comments returns data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return data.users, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read their data directly, independently of DOM filters and other outputs.
832
+
Custom rules return fields after content filters; unmatched fields are null ([] for lists). The google-maps parser returns business records in data.results, google-maps-reviews returns data.reviews, and the google-play parser returns one app record as data, google-play-reviews returns data.reviews, app-store and app-store-reviews do the same for the App Store, g2-reviews returns data.reviews for a G2 product, instagram-profile and instagram-post return one record as data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return one record as data, tiktok-feed returns data.videos, tiktok-comments returns data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return data.users, yelp-search returns up to 20 ranked organic businesses in data.businesses, plus total and pagination, from a Yelp search URL; emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read their data directly, independently of DOM filters and other outputs.
831
833
"""
832
834
833
835
data: Optional[Dict[str, object]] =None
@@ -856,6 +858,7 @@ class DataErrorResultParsed(BaseModel):
856
858
"tiktok-followers",
857
859
"tiktok-following",
858
860
"tiktok-user-search",
861
+
"yelp-search",
859
862
"emails",
860
863
"phone-numbers",
861
864
"links",
@@ -1056,10 +1059,11 @@ class DataErrorResult(BaseModel):
1056
1059
data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return
1057
1060
one record as data, tiktok-feed returns data.videos, tiktok-comments returns
1058
1061
data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return
1059
-
data.users, emails, phone-numbers, and links return data.emails,
1060
-
data.phone_numbers, and data.links from the rendered page; the store, Maps, G2,
1061
-
Instagram, and TikTok parsers read their data directly, independently of DOM
1062
-
filters and other outputs.
1062
+
data.users, yelp-search returns up to 20 ranked organic businesses in
1063
+
data.businesses, plus total and pagination, from a Yelp search URL; emails,
1064
+
phone-numbers, and links return data.emails, data.phone_numbers, and data.links
1065
+
from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read
1066
+
their data directly, independently of DOM filters and other outputs.
Copy file name to clipboardExpand all lines: src/context/dev/types/web_scrape_response.py
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -267,7 +267,7 @@ class Metadata(BaseModel):
267
267
268
268
classParsed(BaseModel):
269
269
"""
270
-
Custom rules return fields after content filters; unmatched fields are null ([] for lists). The google-maps parser returns business records in data.results, google-maps-reviews returns data.reviews, and the google-play parser returns one app record as data, google-play-reviews returns data.reviews, app-store and app-store-reviews do the same for the App Store, g2-reviews returns data.reviews for a G2 product, instagram-profile and instagram-post return one record as data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return one record as data, tiktok-feed returns data.videos, tiktok-comments returns data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return data.users, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read their data directly, independently of DOM filters and other outputs.
270
+
Custom rules return fields after content filters; unmatched fields are null ([] for lists). The google-maps parser returns business records in data.results, google-maps-reviews returns data.reviews, and the google-play parser returns one app record as data, google-play-reviews returns data.reviews, app-store and app-store-reviews do the same for the App Store, g2-reviews returns data.reviews for a G2 product, instagram-profile and instagram-post return one record as data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return one record as data, tiktok-feed returns data.videos, tiktok-comments returns data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return data.users, yelp-search returns up to 20 ranked organic businesses in data.businesses, plus total and pagination, from a Yelp search URL; emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read their data directly, independently of DOM filters and other outputs.
271
271
"""
272
272
273
273
data: Optional[Dict[str, object]] =None
@@ -296,6 +296,7 @@ class Parsed(BaseModel):
296
296
"tiktok-followers",
297
297
"tiktok-following",
298
298
"tiktok-user-search",
299
+
"yelp-search",
299
300
"emails",
300
301
"phone-numbers",
301
302
"links",
@@ -491,10 +492,11 @@ class WebScrapeResponse(BaseModel):
491
492
data, instagram-feed returns data.posts, tiktok-profile and tiktok-video return
492
493
one record as data, tiktok-feed returns data.videos, tiktok-comments returns
493
494
data.comments, tiktok-followers, tiktok-following, and tiktok-user-search return
494
-
data.users, emails, phone-numbers, and links return data.emails,
495
-
data.phone_numbers, and data.links from the rendered page; the store, Maps, G2,
496
-
Instagram, and TikTok parsers read their data directly, independently of DOM
497
-
filters and other outputs.
495
+
data.users, yelp-search returns up to 20 ranked organic businesses in
496
+
data.businesses, plus total and pagination, from a Yelp search URL; emails,
497
+
phone-numbers, and links return data.emails, data.phone_numbers, and data.links
498
+
from the rendered page; the store, Maps, G2, Instagram, and TikTok parsers read
499
+
their data directly, independently of DOM filters and other outputs.
0 commit comments