@bycrawl/nodejs-sdk 0.1.1 → 0.3.0
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/dist/index.cjs +311 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +166 -44
- package/dist/index.d.ts +166 -44
- package/dist/index.js +311 -66
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -475,8 +475,15 @@ var Facebook = class extends APIResource {
|
|
|
475
475
|
castTo: (r) => r
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
|
-
async getUserPosts(username) {
|
|
479
|
-
return this._request("GET", `/facebook/users/${username}/posts
|
|
478
|
+
async getUserPosts(username, options) {
|
|
479
|
+
return this._request("GET", `/facebook/users/${username}/posts`, {
|
|
480
|
+
params: { count: options?.count }
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
async getPagePosts(pageId, options) {
|
|
484
|
+
return this._request("GET", `/facebook/pages/${pageId}/posts`, {
|
|
485
|
+
params: { count: options?.count }
|
|
486
|
+
});
|
|
480
487
|
}
|
|
481
488
|
async getPost(options) {
|
|
482
489
|
return this._get(`/facebook/posts`, {
|
|
@@ -486,25 +493,25 @@ var Facebook = class extends APIResource {
|
|
|
486
493
|
}
|
|
487
494
|
async getPostComments(options) {
|
|
488
495
|
return this._get(`/facebook/posts/comments`, {
|
|
489
|
-
params: { url: options.url
|
|
496
|
+
params: { url: options.url }
|
|
490
497
|
});
|
|
491
498
|
}
|
|
492
499
|
async searchPosts(q, options) {
|
|
493
500
|
return this._get(`/facebook/posts/search`, {
|
|
494
|
-
params: { q, count: options?.count
|
|
501
|
+
params: { q, count: options?.count }
|
|
495
502
|
});
|
|
496
503
|
}
|
|
497
|
-
async
|
|
504
|
+
async browseMarketplace(options) {
|
|
498
505
|
return this._get(`/facebook/marketplace/listings`, {
|
|
499
|
-
params: { location, category: options?.category }
|
|
506
|
+
params: { location: options?.location, category: options?.category }
|
|
500
507
|
});
|
|
501
508
|
}
|
|
502
|
-
async
|
|
509
|
+
async searchMarketplace(q, options) {
|
|
503
510
|
return this._get(`/facebook/marketplace/search`, {
|
|
504
|
-
params: { q, location: options?.location }
|
|
511
|
+
params: { q, location: options?.location, category: options?.category }
|
|
505
512
|
});
|
|
506
513
|
}
|
|
507
|
-
async
|
|
514
|
+
async getMarketplaceItem(listingId) {
|
|
508
515
|
return this._get(`/facebook/marketplace/items/${listingId}`);
|
|
509
516
|
}
|
|
510
517
|
// -- Auto-pagination iterators --
|
|
@@ -536,6 +543,82 @@ var GMaps = class extends APIResource {
|
|
|
536
543
|
castTo: (r) => r
|
|
537
544
|
});
|
|
538
545
|
}
|
|
546
|
+
async getPlaceReviews(query, options) {
|
|
547
|
+
return this._get(`/gmaps/places/reviews`, {
|
|
548
|
+
params: {
|
|
549
|
+
query,
|
|
550
|
+
sort: options?.sort,
|
|
551
|
+
pageToken: options?.pageToken,
|
|
552
|
+
language: options?.language
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
// src/platforms/google.ts
|
|
559
|
+
var Google = class extends APIResource {
|
|
560
|
+
async search(q, options) {
|
|
561
|
+
return this._get(`/google/search`, {
|
|
562
|
+
params: {
|
|
563
|
+
q,
|
|
564
|
+
num: options?.num,
|
|
565
|
+
language: options?.language,
|
|
566
|
+
country: options?.country,
|
|
567
|
+
page: options?.page
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
async news(q, options) {
|
|
572
|
+
return this._get(`/google/news`, {
|
|
573
|
+
params: { q, language: options?.language, country: options?.country }
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
async trends(q, options) {
|
|
577
|
+
return this._get(`/google/trends`, {
|
|
578
|
+
params: {
|
|
579
|
+
q,
|
|
580
|
+
timeframe: options?.timeframe,
|
|
581
|
+
geo: options?.geo,
|
|
582
|
+
category: options?.category
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
async finance(ticker) {
|
|
587
|
+
return this._get(`/google/finance`, {
|
|
588
|
+
params: { ticker }
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
async shopping(q, options) {
|
|
592
|
+
return this._get(`/google/shopping`, {
|
|
593
|
+
params: {
|
|
594
|
+
q,
|
|
595
|
+
num: options?.num,
|
|
596
|
+
min_price: options?.min_price,
|
|
597
|
+
max_price: options?.max_price,
|
|
598
|
+
country: options?.country
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
// src/platforms/hackernews.ts
|
|
605
|
+
var HackerNews = class extends APIResource {
|
|
606
|
+
async getItem(itemId) {
|
|
607
|
+
return this._get(`/hackernews/items/${itemId}`);
|
|
608
|
+
}
|
|
609
|
+
async getUser(username) {
|
|
610
|
+
return this._get(`/hackernews/users/${username}`);
|
|
611
|
+
}
|
|
612
|
+
async getStories(storyType, options) {
|
|
613
|
+
return this._get(`/hackernews/stories/${storyType}`, {
|
|
614
|
+
params: { count: options?.count }
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
async getItemComments(itemId, options) {
|
|
618
|
+
return this._get(`/hackernews/items/${itemId}/comments`, {
|
|
619
|
+
params: { depth: options?.depth }
|
|
620
|
+
});
|
|
621
|
+
}
|
|
539
622
|
};
|
|
540
623
|
|
|
541
624
|
// src/platforms/instagram.ts
|
|
@@ -619,6 +702,11 @@ var Job104 = class extends APIResource {
|
|
|
619
702
|
|
|
620
703
|
// src/platforms/linkedin.ts
|
|
621
704
|
var LinkedIn = class extends APIResource {
|
|
705
|
+
async searchCompanies(q, options) {
|
|
706
|
+
return this._get(`/linkedin/companies/search`, {
|
|
707
|
+
params: { q, count: options?.count }
|
|
708
|
+
});
|
|
709
|
+
}
|
|
622
710
|
async getCompany(companyId) {
|
|
623
711
|
return this._get(`/linkedin/companies/${companyId}`, {
|
|
624
712
|
castTo: (r) => r
|
|
@@ -629,10 +717,15 @@ var LinkedIn = class extends APIResource {
|
|
|
629
717
|
params: { count: options?.count, offset: options?.offset }
|
|
630
718
|
});
|
|
631
719
|
}
|
|
632
|
-
async
|
|
720
|
+
async getCompanyPosts(companyId, options) {
|
|
721
|
+
return this._get(`/linkedin/companies/${companyId}/posts`, {
|
|
722
|
+
params: { count: options?.count }
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
async searchJobs(q, options) {
|
|
633
726
|
return this._getList(`/linkedin/jobs/search`, {
|
|
634
727
|
params: {
|
|
635
|
-
q
|
|
728
|
+
q,
|
|
636
729
|
location: options?.location,
|
|
637
730
|
count: options?.count,
|
|
638
731
|
offset: options?.offset
|
|
@@ -651,9 +744,9 @@ var LinkedIn = class extends APIResource {
|
|
|
651
744
|
castTo: (r) => r
|
|
652
745
|
});
|
|
653
746
|
}
|
|
654
|
-
async searchUsers(
|
|
747
|
+
async searchUsers(q, options) {
|
|
655
748
|
return this._getList(`/linkedin/users/search`, {
|
|
656
|
-
params: { q
|
|
749
|
+
params: { q, count: options?.count, offset: options?.offset },
|
|
657
750
|
itemsKey: "users",
|
|
658
751
|
castTo: (r) => r
|
|
659
752
|
});
|
|
@@ -663,6 +756,18 @@ var LinkedIn = class extends APIResource {
|
|
|
663
756
|
castTo: (r) => r
|
|
664
757
|
});
|
|
665
758
|
}
|
|
759
|
+
async getCompanyEmployees(companyId, options) {
|
|
760
|
+
return this._get(`/linkedin/companies/${companyId}/employees`, {
|
|
761
|
+
params: { count: options?.count ?? 25 }
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
async getUserPosts(username, options) {
|
|
765
|
+
return this._getList(`/linkedin/users/${username}/posts`, {
|
|
766
|
+
params: { count: options?.count ?? 20 },
|
|
767
|
+
itemsKey: "posts",
|
|
768
|
+
castTo: (r) => r
|
|
769
|
+
});
|
|
770
|
+
}
|
|
666
771
|
// -- Auto-pagination iterators --
|
|
667
772
|
iterCompanyJobs(companyId, options) {
|
|
668
773
|
const count = options?.count ?? 10;
|
|
@@ -672,16 +777,95 @@ var LinkedIn = class extends APIResource {
|
|
|
672
777
|
castTo: (r) => r
|
|
673
778
|
});
|
|
674
779
|
}
|
|
675
|
-
iterSearchJobs(
|
|
780
|
+
iterSearchJobs(q, options) {
|
|
676
781
|
const count = options?.count ?? 10;
|
|
677
782
|
return this._paginateByOffset(`/linkedin/jobs/search`, {
|
|
678
|
-
params: { q
|
|
783
|
+
params: { q, location: options?.location, count, limit: count },
|
|
679
784
|
itemsKey: "jobs",
|
|
680
785
|
castTo: (r) => r
|
|
681
786
|
});
|
|
682
787
|
}
|
|
683
788
|
};
|
|
684
789
|
|
|
790
|
+
// src/platforms/luma.ts
|
|
791
|
+
var Luma = class extends APIResource {
|
|
792
|
+
async getEvent(eventId) {
|
|
793
|
+
return this._get(`/luma/events/${eventId}`);
|
|
794
|
+
}
|
|
795
|
+
async getPlaceEvents(placeId, options) {
|
|
796
|
+
return this._get(`/luma/places/${placeId}/events`, {
|
|
797
|
+
params: { count: options?.count, cursor: options?.cursor }
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
async searchEvents(placeId, q, options) {
|
|
801
|
+
return this._get(`/luma/events/search`, {
|
|
802
|
+
params: {
|
|
803
|
+
place_id: placeId,
|
|
804
|
+
q,
|
|
805
|
+
count: options?.count,
|
|
806
|
+
cursor: options?.cursor
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
async getCategories() {
|
|
811
|
+
return this._get(`/luma/categories`);
|
|
812
|
+
}
|
|
813
|
+
async getCalendarEvents(calendarId, options) {
|
|
814
|
+
return this._get(`/luma/calendars/${calendarId}/events`, {
|
|
815
|
+
params: { count: options?.count, cursor: options?.cursor }
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
async getPlace(placeId) {
|
|
819
|
+
return this._get(`/luma/places/${placeId}`);
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
// src/platforms/producthunt.ts
|
|
824
|
+
var ProductHunt = class extends APIResource {
|
|
825
|
+
async getPosts(options) {
|
|
826
|
+
return this._get(`/producthunt/posts`, {
|
|
827
|
+
params: {
|
|
828
|
+
count: options?.count,
|
|
829
|
+
date: options?.date,
|
|
830
|
+
period: options?.period
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
async searchPosts(q, options) {
|
|
835
|
+
return this._get(`/producthunt/posts/search`, {
|
|
836
|
+
params: { q, count: options?.count }
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
async getPost(slug) {
|
|
840
|
+
return this._get(`/producthunt/posts/${slug}`);
|
|
841
|
+
}
|
|
842
|
+
async getReviews(slug) {
|
|
843
|
+
return this._get(`/producthunt/posts/${slug}/reviews`);
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
// src/platforms/ptt.ts
|
|
848
|
+
var PTT = class extends APIResource {
|
|
849
|
+
async getBoard(boardName) {
|
|
850
|
+
return this._get(`/ptt/boards/${boardName}`);
|
|
851
|
+
}
|
|
852
|
+
async getBoardPosts(boardName, options) {
|
|
853
|
+
return this._get(`/ptt/boards/${boardName}/posts`, {
|
|
854
|
+
params: { page: options?.page, count: options?.count }
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
async getPost(url) {
|
|
858
|
+
return this._get(`/ptt/posts`, {
|
|
859
|
+
params: { url }
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
async searchPosts(boardName, q, options) {
|
|
863
|
+
return this._get(`/ptt/boards/${boardName}/search`, {
|
|
864
|
+
params: { q, count: options?.count }
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
};
|
|
868
|
+
|
|
685
869
|
// src/platforms/reddit.ts
|
|
686
870
|
var Reddit = class extends APIResource {
|
|
687
871
|
async getSubreddit(name) {
|
|
@@ -691,7 +875,12 @@ var Reddit = class extends APIResource {
|
|
|
691
875
|
}
|
|
692
876
|
async getSubredditPosts(name, options) {
|
|
693
877
|
return this._getList(`/reddit/subreddits/${name}/posts`, {
|
|
694
|
-
params: {
|
|
878
|
+
params: {
|
|
879
|
+
sort: options?.sort,
|
|
880
|
+
t: options?.t,
|
|
881
|
+
count: options?.count,
|
|
882
|
+
after: options?.after
|
|
883
|
+
},
|
|
695
884
|
itemsKey: "posts",
|
|
696
885
|
castTo: (r) => r
|
|
697
886
|
});
|
|
@@ -703,7 +892,13 @@ var Reddit = class extends APIResource {
|
|
|
703
892
|
}
|
|
704
893
|
async searchPosts(q, options) {
|
|
705
894
|
return this._getList(`/reddit/posts/search`, {
|
|
706
|
-
params: {
|
|
895
|
+
params: {
|
|
896
|
+
q,
|
|
897
|
+
sort: options?.sort,
|
|
898
|
+
t: options?.t,
|
|
899
|
+
count: options?.count,
|
|
900
|
+
after: options?.after
|
|
901
|
+
},
|
|
707
902
|
itemsKey: "posts",
|
|
708
903
|
castTo: (r) => r
|
|
709
904
|
});
|
|
@@ -725,27 +920,59 @@ var Reddit = class extends APIResource {
|
|
|
725
920
|
}
|
|
726
921
|
};
|
|
727
922
|
|
|
923
|
+
// src/platforms/rent591.ts
|
|
924
|
+
var Rent591 = class extends APIResource {
|
|
925
|
+
async getListings(options) {
|
|
926
|
+
return this._get(`/rent591/listings`, {
|
|
927
|
+
params: {
|
|
928
|
+
region: options?.region,
|
|
929
|
+
first_row: options?.first_row,
|
|
930
|
+
kind: options?.kind,
|
|
931
|
+
section: options?.section,
|
|
932
|
+
price: options?.price,
|
|
933
|
+
count: options?.count
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
async getListing(listingId) {
|
|
938
|
+
return this._get(`/rent591/listings/${listingId}`);
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
|
|
728
942
|
// src/platforms/threads.ts
|
|
729
943
|
var Threads = class extends APIResource {
|
|
730
|
-
async getPost(postId
|
|
944
|
+
async getPost(postId) {
|
|
731
945
|
return this._get(`/threads/posts/${postId}`, {
|
|
732
|
-
params: { mode: options?.mode },
|
|
733
946
|
castTo: (r) => r
|
|
734
947
|
});
|
|
735
948
|
}
|
|
736
|
-
async getPosts(ids
|
|
949
|
+
async getPosts(ids) {
|
|
737
950
|
const resp = await this._request("GET", `/threads/posts`, {
|
|
738
|
-
params: { ids: ids.join(",")
|
|
951
|
+
params: { ids: ids.join(",") }
|
|
739
952
|
});
|
|
740
953
|
return resp;
|
|
741
954
|
}
|
|
742
955
|
async searchPosts(q, options) {
|
|
743
956
|
return this._getList(`/threads/posts/search`, {
|
|
744
|
-
params: {
|
|
957
|
+
params: {
|
|
958
|
+
q,
|
|
959
|
+
count: options?.count,
|
|
960
|
+
search_type: options?.search_type,
|
|
961
|
+
cursor: options?.cursor
|
|
962
|
+
},
|
|
745
963
|
itemsKey: "posts",
|
|
746
964
|
castTo: (r) => r
|
|
747
965
|
});
|
|
748
966
|
}
|
|
967
|
+
/**
|
|
968
|
+
* Get direct replies to a Threads post.
|
|
969
|
+
*
|
|
970
|
+
* Returns `{rootPost, replies, totalReplies, hasMore}`. Anonymous SSR
|
|
971
|
+
* embeds ~20 top-level replies per post; pagination is not supported.
|
|
972
|
+
*/
|
|
973
|
+
async getPostReplies(postId) {
|
|
974
|
+
return this._get(`/threads/posts/${postId}/replies`);
|
|
975
|
+
}
|
|
749
976
|
async getUser(username) {
|
|
750
977
|
return this._get(`/threads/users/${username}`, {
|
|
751
978
|
castTo: (r) => r
|
|
@@ -770,42 +997,12 @@ var Threads = class extends APIResource {
|
|
|
770
997
|
}
|
|
771
998
|
async getPublicFeed(options) {
|
|
772
999
|
return this._get(`/threads/feed/public`, {
|
|
773
|
-
params: {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
async bulkSubmit(ids, options) {
|
|
778
|
-
return this._post(`/threads/bulk`, {
|
|
779
|
-
body: { ids, type: options?.type ?? "content" },
|
|
780
|
-
castTo: (r) => r
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
async bulkStatus(jobId) {
|
|
784
|
-
return this._get(`/threads/bulk/${jobId}`, {
|
|
785
|
-
castTo: (r) => r
|
|
786
|
-
});
|
|
787
|
-
}
|
|
788
|
-
async bulkResults(jobId) {
|
|
789
|
-
return this._request("GET", `/threads/bulk/${jobId}/results`);
|
|
790
|
-
}
|
|
791
|
-
async bulkSubmitAndWait(ids, options) {
|
|
792
|
-
const pollInterval = options?.pollInterval ?? 2e3;
|
|
793
|
-
const timeout = options?.timeout ?? 3e5;
|
|
794
|
-
const submitResp = await this.bulkSubmit(ids);
|
|
795
|
-
const jobId = submitResp.data.jobId;
|
|
796
|
-
const deadline = Date.now() + timeout;
|
|
797
|
-
while (Date.now() < deadline) {
|
|
798
|
-
const statusResp = await this.bulkStatus(jobId);
|
|
799
|
-
const status = statusResp.data.status;
|
|
800
|
-
if (status === "completed") {
|
|
801
|
-
return this.bulkResults(jobId);
|
|
802
|
-
}
|
|
803
|
-
if (status === "failed") {
|
|
804
|
-
throw new ByCrawlError(`Bulk job ${jobId} failed`);
|
|
1000
|
+
params: {
|
|
1001
|
+
cursor: options?.cursor,
|
|
1002
|
+
count: options?.count,
|
|
1003
|
+
country: options?.country
|
|
805
1004
|
}
|
|
806
|
-
|
|
807
|
-
}
|
|
808
|
-
throw new TimeoutError(`Bulk job ${jobId} timed out after ${timeout}ms`);
|
|
1005
|
+
});
|
|
809
1006
|
}
|
|
810
1007
|
// -- Auto-pagination iterators --
|
|
811
1008
|
iterUserPosts(userId, options) {
|
|
@@ -846,18 +1043,15 @@ var TikTok = class extends APIResource {
|
|
|
846
1043
|
params: { cursor: options?.cursor }
|
|
847
1044
|
});
|
|
848
1045
|
}
|
|
849
|
-
async
|
|
850
|
-
return this._get(`/tiktok/categories`, {
|
|
851
|
-
params: { category: options?.category, count: options?.count }
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
async search(keyword, options) {
|
|
1046
|
+
async search(q, options) {
|
|
855
1047
|
return this._get(`/tiktok/videos/search`, {
|
|
856
|
-
params: { q
|
|
1048
|
+
params: { q, count: options?.count }
|
|
857
1049
|
});
|
|
858
1050
|
}
|
|
859
|
-
async getVideoSubtitles(videoId) {
|
|
860
|
-
return this._get(`/tiktok/videos/${videoId}/subtitles
|
|
1051
|
+
async getVideoSubtitles(videoId, options) {
|
|
1052
|
+
return this._get(`/tiktok/videos/${videoId}/subtitles`, {
|
|
1053
|
+
params: { language: options?.language }
|
|
1054
|
+
});
|
|
861
1055
|
}
|
|
862
1056
|
// -- Auto-pagination iterators --
|
|
863
1057
|
iterVideoComments(videoId) {
|
|
@@ -869,6 +1063,38 @@ var TikTok = class extends APIResource {
|
|
|
869
1063
|
}
|
|
870
1064
|
};
|
|
871
1065
|
|
|
1066
|
+
// src/platforms/trustpilot.ts
|
|
1067
|
+
var Trustpilot = class extends APIResource {
|
|
1068
|
+
async getBusiness(domain) {
|
|
1069
|
+
return this._get(`/trustpilot/businesses/${domain}`);
|
|
1070
|
+
}
|
|
1071
|
+
async getBusinessReviews(domain, options) {
|
|
1072
|
+
return this._get(`/trustpilot/businesses/${domain}/reviews`, {
|
|
1073
|
+
params: {
|
|
1074
|
+
page: options?.page,
|
|
1075
|
+
sort: options?.sort,
|
|
1076
|
+
stars: options?.stars,
|
|
1077
|
+
languages: options?.languages
|
|
1078
|
+
}
|
|
1079
|
+
});
|
|
1080
|
+
}
|
|
1081
|
+
async searchBusinesses(q, options) {
|
|
1082
|
+
return this._get(`/trustpilot/businesses/search`, {
|
|
1083
|
+
params: { q, page: options?.page }
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
async searchCategories(q) {
|
|
1087
|
+
return this._get(`/trustpilot/categories/search`, {
|
|
1088
|
+
params: { q }
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
async getSuggestions(q) {
|
|
1092
|
+
return this._get(`/trustpilot/suggestions`, {
|
|
1093
|
+
params: { q }
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
};
|
|
1097
|
+
|
|
872
1098
|
// src/platforms/webfetch.ts
|
|
873
1099
|
var WebFetch = class extends APIResource {
|
|
874
1100
|
async fetch(url, options) {
|
|
@@ -876,6 +1102,11 @@ var WebFetch = class extends APIResource {
|
|
|
876
1102
|
params: { url, format: options?.format }
|
|
877
1103
|
});
|
|
878
1104
|
}
|
|
1105
|
+
async search(q, options) {
|
|
1106
|
+
return this._get(`/web/search`, {
|
|
1107
|
+
params: { q, count: options?.count }
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
879
1110
|
};
|
|
880
1111
|
|
|
881
1112
|
// src/platforms/x.ts
|
|
@@ -980,7 +1211,14 @@ var ByCrawl = class {
|
|
|
980
1211
|
youtube;
|
|
981
1212
|
dcard;
|
|
982
1213
|
gmaps;
|
|
1214
|
+
google;
|
|
1215
|
+
hackernews;
|
|
983
1216
|
job104;
|
|
1217
|
+
luma;
|
|
1218
|
+
producthunt;
|
|
1219
|
+
trustpilot;
|
|
1220
|
+
ptt;
|
|
1221
|
+
rent591;
|
|
984
1222
|
web;
|
|
985
1223
|
_transport;
|
|
986
1224
|
constructor(options) {
|
|
@@ -1006,7 +1244,14 @@ var ByCrawl = class {
|
|
|
1006
1244
|
this.youtube = new YouTube(this._transport);
|
|
1007
1245
|
this.dcard = new Dcard(this._transport);
|
|
1008
1246
|
this.gmaps = new GMaps(this._transport);
|
|
1247
|
+
this.google = new Google(this._transport);
|
|
1248
|
+
this.hackernews = new HackerNews(this._transport);
|
|
1009
1249
|
this.job104 = new Job104(this._transport);
|
|
1250
|
+
this.luma = new Luma(this._transport);
|
|
1251
|
+
this.producthunt = new ProductHunt(this._transport);
|
|
1252
|
+
this.trustpilot = new Trustpilot(this._transport);
|
|
1253
|
+
this.ptt = new PTT(this._transport);
|
|
1254
|
+
this.rent591 = new Rent591(this._transport);
|
|
1010
1255
|
this.web = new WebFetch(this._transport);
|
|
1011
1256
|
}
|
|
1012
1257
|
};
|