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 fb329c9
Browse filesBrowse the repository at this point in the historyBrowse files
stlc-bot
committed
feat(scrape): add Instagram profile, post, and feed prebuilt parsers (#1905)
Copy file name to clipboardExpand all lines: src/context/dev/types/batch_get_results_response.py
+18-10Lines changed: 18 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, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, and G2 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, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, and Instagram parsers read their data directly, independently of DOM filters and other outputs.
298
298
"""
299
299
300
300
data: Optional[Dict[str, object]] =None
@@ -313,6 +313,9 @@ class DataOkResultParsed(BaseModel):
313
313
"app-store",
314
314
"app-store-reviews",
315
315
"g2-reviews",
316
+
"instagram-profile",
317
+
"instagram-post",
318
+
"instagram-feed",
316
319
"emails",
317
320
"phone-numbers",
318
321
"links",
@@ -508,10 +511,11 @@ class DataOkResult(BaseModel):
508
511
google-maps-reviews returns data.reviews, and the google-play parser returns one
509
512
app record as data, google-play-reviews returns data.reviews, app-store and
510
513
app-store-reviews do the same for the App Store, g2-reviews returns data.reviews
511
-
for a G2 product, emails, phone-numbers, and links return data.emails,
512
-
data.phone_numbers, and data.links from the rendered page; the store, Maps, and
513
-
G2 parsers read their data directly, independently of DOM filters and other
514
-
outputs.
514
+
for a G2 product, instagram-profile and instagram-post return one record as
515
+
data, instagram-feed returns data.posts, emails, phone-numbers, and links return
516
+
data.emails, data.phone_numbers, and data.links from the rendered page; the
517
+
store, Maps, G2, and Instagram parsers read their data directly, independently
518
+
of DOM filters and other outputs.
515
519
"""
516
520
517
521
product: DataOkResultProduct
@@ -813,7 +817,7 @@ class DataErrorResultMetadata(BaseModel):
813
817
814
818
classDataErrorResultParsed(BaseModel):
815
819
"""
816
-
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, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, and G2 parsers read their data directly, independently of DOM filters and other outputs.
820
+
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, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, and Instagram parsers read their data directly, independently of DOM filters and other outputs.
817
821
"""
818
822
819
823
data: Optional[Dict[str, object]] =None
@@ -832,6 +836,9 @@ class DataErrorResultParsed(BaseModel):
832
836
"app-store",
833
837
"app-store-reviews",
834
838
"g2-reviews",
839
+
"instagram-profile",
840
+
"instagram-post",
841
+
"instagram-feed",
835
842
"emails",
836
843
"phone-numbers",
837
844
"links",
@@ -1028,10 +1035,11 @@ class DataErrorResult(BaseModel):
1028
1035
google-maps-reviews returns data.reviews, and the google-play parser returns one
1029
1036
app record as data, google-play-reviews returns data.reviews, app-store and
1030
1037
app-store-reviews do the same for the App Store, g2-reviews returns data.reviews
1031
-
for a G2 product, emails, phone-numbers, and links return data.emails,
1032
-
data.phone_numbers, and data.links from the rendered page; the store, Maps, and
1033
-
G2 parsers read their data directly, independently of DOM filters and other
1034
-
outputs.
1038
+
for a G2 product, instagram-profile and instagram-post return one record as
1039
+
data, instagram-feed returns data.posts, emails, phone-numbers, and links return
1040
+
data.emails, data.phone_numbers, and data.links from the rendered page; the
1041
+
store, Maps, G2, and Instagram parsers read their data directly, independently
Copy file name to clipboardExpand all lines: src/context/dev/types/web_scrape_response.py
+9-5Lines changed: 9 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, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, and G2 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, emails, phone-numbers, and links return data.emails, data.phone_numbers, and data.links from the rendered page; the store, Maps, G2, and Instagram parsers read their data directly, independently of DOM filters and other outputs.
271
271
"""
272
272
273
273
data: Optional[Dict[str, object]] =None
@@ -286,6 +286,9 @@ class Parsed(BaseModel):
286
286
"app-store",
287
287
"app-store-reviews",
288
288
"g2-reviews",
289
+
"instagram-profile",
290
+
"instagram-post",
291
+
"instagram-feed",
289
292
"emails",
290
293
"phone-numbers",
291
294
"links",
@@ -477,10 +480,11 @@ class WebScrapeResponse(BaseModel):
477
480
google-maps-reviews returns data.reviews, and the google-play parser returns one
478
481
app record as data, google-play-reviews returns data.reviews, app-store and
479
482
app-store-reviews do the same for the App Store, g2-reviews returns data.reviews
480
-
for a G2 product, emails, phone-numbers, and links return data.emails,
481
-
data.phone_numbers, and data.links from the rendered page; the store, Maps, and
482
-
G2 parsers read their data directly, independently of DOM filters and other
483
-
outputs.
483
+
for a G2 product, instagram-profile and instagram-post return one record as
484
+
data, instagram-feed returns data.posts, emails, phone-numbers, and links return
485
+
data.emails, data.phone_numbers, and data.links from the rendered page; the
486
+
store, Maps, G2, and Instagram parsers read their data directly, independently
0 commit comments