@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.js
CHANGED
|
@@ -439,8 +439,15 @@ var Facebook = class extends APIResource {
|
|
|
439
439
|
castTo: (r) => r
|
|
440
440
|
});
|
|
441
441
|
}
|
|
442
|
-
async getUserPosts(username) {
|
|
443
|
-
return this._request("GET", `/facebook/users/${username}/posts
|
|
442
|
+
async getUserPosts(username, options) {
|
|
443
|
+
return this._request("GET", `/facebook/users/${username}/posts`, {
|
|
444
|
+
params: { count: options?.count }
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
async getPagePosts(pageId, options) {
|
|
448
|
+
return this._request("GET", `/facebook/pages/${pageId}/posts`, {
|
|
449
|
+
params: { count: options?.count }
|
|
450
|
+
});
|
|
444
451
|
}
|
|
445
452
|
async getPost(options) {
|
|
446
453
|
return this._get(`/facebook/posts`, {
|
|
@@ -450,25 +457,25 @@ var Facebook = class extends APIResource {
|
|
|
450
457
|
}
|
|
451
458
|
async getPostComments(options) {
|
|
452
459
|
return this._get(`/facebook/posts/comments`, {
|
|
453
|
-
params: { url: options.url
|
|
460
|
+
params: { url: options.url }
|
|
454
461
|
});
|
|
455
462
|
}
|
|
456
463
|
async searchPosts(q, options) {
|
|
457
464
|
return this._get(`/facebook/posts/search`, {
|
|
458
|
-
params: { q, count: options?.count
|
|
465
|
+
params: { q, count: options?.count }
|
|
459
466
|
});
|
|
460
467
|
}
|
|
461
|
-
async
|
|
468
|
+
async browseMarketplace(options) {
|
|
462
469
|
return this._get(`/facebook/marketplace/listings`, {
|
|
463
|
-
params: { location, category: options?.category }
|
|
470
|
+
params: { location: options?.location, category: options?.category }
|
|
464
471
|
});
|
|
465
472
|
}
|
|
466
|
-
async
|
|
473
|
+
async searchMarketplace(q, options) {
|
|
467
474
|
return this._get(`/facebook/marketplace/search`, {
|
|
468
|
-
params: { q, location: options?.location }
|
|
475
|
+
params: { q, location: options?.location, category: options?.category }
|
|
469
476
|
});
|
|
470
477
|
}
|
|
471
|
-
async
|
|
478
|
+
async getMarketplaceItem(listingId) {
|
|
472
479
|
return this._get(`/facebook/marketplace/items/${listingId}`);
|
|
473
480
|
}
|
|
474
481
|
// -- Auto-pagination iterators --
|
|
@@ -500,6 +507,82 @@ var GMaps = class extends APIResource {
|
|
|
500
507
|
castTo: (r) => r
|
|
501
508
|
});
|
|
502
509
|
}
|
|
510
|
+
async getPlaceReviews(query, options) {
|
|
511
|
+
return this._get(`/gmaps/places/reviews`, {
|
|
512
|
+
params: {
|
|
513
|
+
query,
|
|
514
|
+
sort: options?.sort,
|
|
515
|
+
pageToken: options?.pageToken,
|
|
516
|
+
language: options?.language
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
// src/platforms/google.ts
|
|
523
|
+
var Google = class extends APIResource {
|
|
524
|
+
async search(q, options) {
|
|
525
|
+
return this._get(`/google/search`, {
|
|
526
|
+
params: {
|
|
527
|
+
q,
|
|
528
|
+
num: options?.num,
|
|
529
|
+
language: options?.language,
|
|
530
|
+
country: options?.country,
|
|
531
|
+
page: options?.page
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
async news(q, options) {
|
|
536
|
+
return this._get(`/google/news`, {
|
|
537
|
+
params: { q, language: options?.language, country: options?.country }
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
async trends(q, options) {
|
|
541
|
+
return this._get(`/google/trends`, {
|
|
542
|
+
params: {
|
|
543
|
+
q,
|
|
544
|
+
timeframe: options?.timeframe,
|
|
545
|
+
geo: options?.geo,
|
|
546
|
+
category: options?.category
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
async finance(ticker) {
|
|
551
|
+
return this._get(`/google/finance`, {
|
|
552
|
+
params: { ticker }
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
async shopping(q, options) {
|
|
556
|
+
return this._get(`/google/shopping`, {
|
|
557
|
+
params: {
|
|
558
|
+
q,
|
|
559
|
+
num: options?.num,
|
|
560
|
+
min_price: options?.min_price,
|
|
561
|
+
max_price: options?.max_price,
|
|
562
|
+
country: options?.country
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
// src/platforms/hackernews.ts
|
|
569
|
+
var HackerNews = class extends APIResource {
|
|
570
|
+
async getItem(itemId) {
|
|
571
|
+
return this._get(`/hackernews/items/${itemId}`);
|
|
572
|
+
}
|
|
573
|
+
async getUser(username) {
|
|
574
|
+
return this._get(`/hackernews/users/${username}`);
|
|
575
|
+
}
|
|
576
|
+
async getStories(storyType, options) {
|
|
577
|
+
return this._get(`/hackernews/stories/${storyType}`, {
|
|
578
|
+
params: { count: options?.count }
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
async getItemComments(itemId, options) {
|
|
582
|
+
return this._get(`/hackernews/items/${itemId}/comments`, {
|
|
583
|
+
params: { depth: options?.depth }
|
|
584
|
+
});
|
|
585
|
+
}
|
|
503
586
|
};
|
|
504
587
|
|
|
505
588
|
// src/platforms/instagram.ts
|
|
@@ -583,6 +666,11 @@ var Job104 = class extends APIResource {
|
|
|
583
666
|
|
|
584
667
|
// src/platforms/linkedin.ts
|
|
585
668
|
var LinkedIn = class extends APIResource {
|
|
669
|
+
async searchCompanies(q, options) {
|
|
670
|
+
return this._get(`/linkedin/companies/search`, {
|
|
671
|
+
params: { q, count: options?.count }
|
|
672
|
+
});
|
|
673
|
+
}
|
|
586
674
|
async getCompany(companyId) {
|
|
587
675
|
return this._get(`/linkedin/companies/${companyId}`, {
|
|
588
676
|
castTo: (r) => r
|
|
@@ -593,10 +681,15 @@ var LinkedIn = class extends APIResource {
|
|
|
593
681
|
params: { count: options?.count, offset: options?.offset }
|
|
594
682
|
});
|
|
595
683
|
}
|
|
596
|
-
async
|
|
684
|
+
async getCompanyPosts(companyId, options) {
|
|
685
|
+
return this._get(`/linkedin/companies/${companyId}/posts`, {
|
|
686
|
+
params: { count: options?.count }
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
async searchJobs(q, options) {
|
|
597
690
|
return this._getList(`/linkedin/jobs/search`, {
|
|
598
691
|
params: {
|
|
599
|
-
q
|
|
692
|
+
q,
|
|
600
693
|
location: options?.location,
|
|
601
694
|
count: options?.count,
|
|
602
695
|
offset: options?.offset
|
|
@@ -615,9 +708,9 @@ var LinkedIn = class extends APIResource {
|
|
|
615
708
|
castTo: (r) => r
|
|
616
709
|
});
|
|
617
710
|
}
|
|
618
|
-
async searchUsers(
|
|
711
|
+
async searchUsers(q, options) {
|
|
619
712
|
return this._getList(`/linkedin/users/search`, {
|
|
620
|
-
params: { q
|
|
713
|
+
params: { q, count: options?.count, offset: options?.offset },
|
|
621
714
|
itemsKey: "users",
|
|
622
715
|
castTo: (r) => r
|
|
623
716
|
});
|
|
@@ -627,6 +720,18 @@ var LinkedIn = class extends APIResource {
|
|
|
627
720
|
castTo: (r) => r
|
|
628
721
|
});
|
|
629
722
|
}
|
|
723
|
+
async getCompanyEmployees(companyId, options) {
|
|
724
|
+
return this._get(`/linkedin/companies/${companyId}/employees`, {
|
|
725
|
+
params: { count: options?.count ?? 25 }
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
async getUserPosts(username, options) {
|
|
729
|
+
return this._getList(`/linkedin/users/${username}/posts`, {
|
|
730
|
+
params: { count: options?.count ?? 20 },
|
|
731
|
+
itemsKey: "posts",
|
|
732
|
+
castTo: (r) => r
|
|
733
|
+
});
|
|
734
|
+
}
|
|
630
735
|
// -- Auto-pagination iterators --
|
|
631
736
|
iterCompanyJobs(companyId, options) {
|
|
632
737
|
const count = options?.count ?? 10;
|
|
@@ -636,16 +741,95 @@ var LinkedIn = class extends APIResource {
|
|
|
636
741
|
castTo: (r) => r
|
|
637
742
|
});
|
|
638
743
|
}
|
|
639
|
-
iterSearchJobs(
|
|
744
|
+
iterSearchJobs(q, options) {
|
|
640
745
|
const count = options?.count ?? 10;
|
|
641
746
|
return this._paginateByOffset(`/linkedin/jobs/search`, {
|
|
642
|
-
params: { q
|
|
747
|
+
params: { q, location: options?.location, count, limit: count },
|
|
643
748
|
itemsKey: "jobs",
|
|
644
749
|
castTo: (r) => r
|
|
645
750
|
});
|
|
646
751
|
}
|
|
647
752
|
};
|
|
648
753
|
|
|
754
|
+
// src/platforms/luma.ts
|
|
755
|
+
var Luma = class extends APIResource {
|
|
756
|
+
async getEvent(eventId) {
|
|
757
|
+
return this._get(`/luma/events/${eventId}`);
|
|
758
|
+
}
|
|
759
|
+
async getPlaceEvents(placeId, options) {
|
|
760
|
+
return this._get(`/luma/places/${placeId}/events`, {
|
|
761
|
+
params: { count: options?.count, cursor: options?.cursor }
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
async searchEvents(placeId, q, options) {
|
|
765
|
+
return this._get(`/luma/events/search`, {
|
|
766
|
+
params: {
|
|
767
|
+
place_id: placeId,
|
|
768
|
+
q,
|
|
769
|
+
count: options?.count,
|
|
770
|
+
cursor: options?.cursor
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
async getCategories() {
|
|
775
|
+
return this._get(`/luma/categories`);
|
|
776
|
+
}
|
|
777
|
+
async getCalendarEvents(calendarId, options) {
|
|
778
|
+
return this._get(`/luma/calendars/${calendarId}/events`, {
|
|
779
|
+
params: { count: options?.count, cursor: options?.cursor }
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
async getPlace(placeId) {
|
|
783
|
+
return this._get(`/luma/places/${placeId}`);
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
// src/platforms/producthunt.ts
|
|
788
|
+
var ProductHunt = class extends APIResource {
|
|
789
|
+
async getPosts(options) {
|
|
790
|
+
return this._get(`/producthunt/posts`, {
|
|
791
|
+
params: {
|
|
792
|
+
count: options?.count,
|
|
793
|
+
date: options?.date,
|
|
794
|
+
period: options?.period
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
async searchPosts(q, options) {
|
|
799
|
+
return this._get(`/producthunt/posts/search`, {
|
|
800
|
+
params: { q, count: options?.count }
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
async getPost(slug) {
|
|
804
|
+
return this._get(`/producthunt/posts/${slug}`);
|
|
805
|
+
}
|
|
806
|
+
async getReviews(slug) {
|
|
807
|
+
return this._get(`/producthunt/posts/${slug}/reviews`);
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
// src/platforms/ptt.ts
|
|
812
|
+
var PTT = class extends APIResource {
|
|
813
|
+
async getBoard(boardName) {
|
|
814
|
+
return this._get(`/ptt/boards/${boardName}`);
|
|
815
|
+
}
|
|
816
|
+
async getBoardPosts(boardName, options) {
|
|
817
|
+
return this._get(`/ptt/boards/${boardName}/posts`, {
|
|
818
|
+
params: { page: options?.page, count: options?.count }
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
async getPost(url) {
|
|
822
|
+
return this._get(`/ptt/posts`, {
|
|
823
|
+
params: { url }
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
async searchPosts(boardName, q, options) {
|
|
827
|
+
return this._get(`/ptt/boards/${boardName}/search`, {
|
|
828
|
+
params: { q, count: options?.count }
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
|
|
649
833
|
// src/platforms/reddit.ts
|
|
650
834
|
var Reddit = class extends APIResource {
|
|
651
835
|
async getSubreddit(name) {
|
|
@@ -655,7 +839,12 @@ var Reddit = class extends APIResource {
|
|
|
655
839
|
}
|
|
656
840
|
async getSubredditPosts(name, options) {
|
|
657
841
|
return this._getList(`/reddit/subreddits/${name}/posts`, {
|
|
658
|
-
params: {
|
|
842
|
+
params: {
|
|
843
|
+
sort: options?.sort,
|
|
844
|
+
t: options?.t,
|
|
845
|
+
count: options?.count,
|
|
846
|
+
after: options?.after
|
|
847
|
+
},
|
|
659
848
|
itemsKey: "posts",
|
|
660
849
|
castTo: (r) => r
|
|
661
850
|
});
|
|
@@ -667,7 +856,13 @@ var Reddit = class extends APIResource {
|
|
|
667
856
|
}
|
|
668
857
|
async searchPosts(q, options) {
|
|
669
858
|
return this._getList(`/reddit/posts/search`, {
|
|
670
|
-
params: {
|
|
859
|
+
params: {
|
|
860
|
+
q,
|
|
861
|
+
sort: options?.sort,
|
|
862
|
+
t: options?.t,
|
|
863
|
+
count: options?.count,
|
|
864
|
+
after: options?.after
|
|
865
|
+
},
|
|
671
866
|
itemsKey: "posts",
|
|
672
867
|
castTo: (r) => r
|
|
673
868
|
});
|
|
@@ -689,27 +884,59 @@ var Reddit = class extends APIResource {
|
|
|
689
884
|
}
|
|
690
885
|
};
|
|
691
886
|
|
|
887
|
+
// src/platforms/rent591.ts
|
|
888
|
+
var Rent591 = class extends APIResource {
|
|
889
|
+
async getListings(options) {
|
|
890
|
+
return this._get(`/rent591/listings`, {
|
|
891
|
+
params: {
|
|
892
|
+
region: options?.region,
|
|
893
|
+
first_row: options?.first_row,
|
|
894
|
+
kind: options?.kind,
|
|
895
|
+
section: options?.section,
|
|
896
|
+
price: options?.price,
|
|
897
|
+
count: options?.count
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
async getListing(listingId) {
|
|
902
|
+
return this._get(`/rent591/listings/${listingId}`);
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
|
|
692
906
|
// src/platforms/threads.ts
|
|
693
907
|
var Threads = class extends APIResource {
|
|
694
|
-
async getPost(postId
|
|
908
|
+
async getPost(postId) {
|
|
695
909
|
return this._get(`/threads/posts/${postId}`, {
|
|
696
|
-
params: { mode: options?.mode },
|
|
697
910
|
castTo: (r) => r
|
|
698
911
|
});
|
|
699
912
|
}
|
|
700
|
-
async getPosts(ids
|
|
913
|
+
async getPosts(ids) {
|
|
701
914
|
const resp = await this._request("GET", `/threads/posts`, {
|
|
702
|
-
params: { ids: ids.join(",")
|
|
915
|
+
params: { ids: ids.join(",") }
|
|
703
916
|
});
|
|
704
917
|
return resp;
|
|
705
918
|
}
|
|
706
919
|
async searchPosts(q, options) {
|
|
707
920
|
return this._getList(`/threads/posts/search`, {
|
|
708
|
-
params: {
|
|
921
|
+
params: {
|
|
922
|
+
q,
|
|
923
|
+
count: options?.count,
|
|
924
|
+
search_type: options?.search_type,
|
|
925
|
+
cursor: options?.cursor
|
|
926
|
+
},
|
|
709
927
|
itemsKey: "posts",
|
|
710
928
|
castTo: (r) => r
|
|
711
929
|
});
|
|
712
930
|
}
|
|
931
|
+
/**
|
|
932
|
+
* Get direct replies to a Threads post.
|
|
933
|
+
*
|
|
934
|
+
* Returns `{rootPost, replies, totalReplies, hasMore}`. Anonymous SSR
|
|
935
|
+
* embeds ~20 top-level replies per post; pagination is not supported.
|
|
936
|
+
*/
|
|
937
|
+
async getPostReplies(postId) {
|
|
938
|
+
return this._get(`/threads/posts/${postId}/replies`);
|
|
939
|
+
}
|
|
713
940
|
async getUser(username) {
|
|
714
941
|
return this._get(`/threads/users/${username}`, {
|
|
715
942
|
castTo: (r) => r
|
|
@@ -734,42 +961,12 @@ var Threads = class extends APIResource {
|
|
|
734
961
|
}
|
|
735
962
|
async getPublicFeed(options) {
|
|
736
963
|
return this._get(`/threads/feed/public`, {
|
|
737
|
-
params: {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
async bulkSubmit(ids, options) {
|
|
742
|
-
return this._post(`/threads/bulk`, {
|
|
743
|
-
body: { ids, type: options?.type ?? "content" },
|
|
744
|
-
castTo: (r) => r
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
async bulkStatus(jobId) {
|
|
748
|
-
return this._get(`/threads/bulk/${jobId}`, {
|
|
749
|
-
castTo: (r) => r
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
async bulkResults(jobId) {
|
|
753
|
-
return this._request("GET", `/threads/bulk/${jobId}/results`);
|
|
754
|
-
}
|
|
755
|
-
async bulkSubmitAndWait(ids, options) {
|
|
756
|
-
const pollInterval = options?.pollInterval ?? 2e3;
|
|
757
|
-
const timeout = options?.timeout ?? 3e5;
|
|
758
|
-
const submitResp = await this.bulkSubmit(ids);
|
|
759
|
-
const jobId = submitResp.data.jobId;
|
|
760
|
-
const deadline = Date.now() + timeout;
|
|
761
|
-
while (Date.now() < deadline) {
|
|
762
|
-
const statusResp = await this.bulkStatus(jobId);
|
|
763
|
-
const status = statusResp.data.status;
|
|
764
|
-
if (status === "completed") {
|
|
765
|
-
return this.bulkResults(jobId);
|
|
766
|
-
}
|
|
767
|
-
if (status === "failed") {
|
|
768
|
-
throw new ByCrawlError(`Bulk job ${jobId} failed`);
|
|
964
|
+
params: {
|
|
965
|
+
cursor: options?.cursor,
|
|
966
|
+
count: options?.count,
|
|
967
|
+
country: options?.country
|
|
769
968
|
}
|
|
770
|
-
|
|
771
|
-
}
|
|
772
|
-
throw new TimeoutError(`Bulk job ${jobId} timed out after ${timeout}ms`);
|
|
969
|
+
});
|
|
773
970
|
}
|
|
774
971
|
// -- Auto-pagination iterators --
|
|
775
972
|
iterUserPosts(userId, options) {
|
|
@@ -810,18 +1007,15 @@ var TikTok = class extends APIResource {
|
|
|
810
1007
|
params: { cursor: options?.cursor }
|
|
811
1008
|
});
|
|
812
1009
|
}
|
|
813
|
-
async
|
|
814
|
-
return this._get(`/tiktok/categories`, {
|
|
815
|
-
params: { category: options?.category, count: options?.count }
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
async search(keyword, options) {
|
|
1010
|
+
async search(q, options) {
|
|
819
1011
|
return this._get(`/tiktok/videos/search`, {
|
|
820
|
-
params: { q
|
|
1012
|
+
params: { q, count: options?.count }
|
|
821
1013
|
});
|
|
822
1014
|
}
|
|
823
|
-
async getVideoSubtitles(videoId) {
|
|
824
|
-
return this._get(`/tiktok/videos/${videoId}/subtitles
|
|
1015
|
+
async getVideoSubtitles(videoId, options) {
|
|
1016
|
+
return this._get(`/tiktok/videos/${videoId}/subtitles`, {
|
|
1017
|
+
params: { language: options?.language }
|
|
1018
|
+
});
|
|
825
1019
|
}
|
|
826
1020
|
// -- Auto-pagination iterators --
|
|
827
1021
|
iterVideoComments(videoId) {
|
|
@@ -833,6 +1027,38 @@ var TikTok = class extends APIResource {
|
|
|
833
1027
|
}
|
|
834
1028
|
};
|
|
835
1029
|
|
|
1030
|
+
// src/platforms/trustpilot.ts
|
|
1031
|
+
var Trustpilot = class extends APIResource {
|
|
1032
|
+
async getBusiness(domain) {
|
|
1033
|
+
return this._get(`/trustpilot/businesses/${domain}`);
|
|
1034
|
+
}
|
|
1035
|
+
async getBusinessReviews(domain, options) {
|
|
1036
|
+
return this._get(`/trustpilot/businesses/${domain}/reviews`, {
|
|
1037
|
+
params: {
|
|
1038
|
+
page: options?.page,
|
|
1039
|
+
sort: options?.sort,
|
|
1040
|
+
stars: options?.stars,
|
|
1041
|
+
languages: options?.languages
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
async searchBusinesses(q, options) {
|
|
1046
|
+
return this._get(`/trustpilot/businesses/search`, {
|
|
1047
|
+
params: { q, page: options?.page }
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
async searchCategories(q) {
|
|
1051
|
+
return this._get(`/trustpilot/categories/search`, {
|
|
1052
|
+
params: { q }
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
async getSuggestions(q) {
|
|
1056
|
+
return this._get(`/trustpilot/suggestions`, {
|
|
1057
|
+
params: { q }
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
|
|
836
1062
|
// src/platforms/webfetch.ts
|
|
837
1063
|
var WebFetch = class extends APIResource {
|
|
838
1064
|
async fetch(url, options) {
|
|
@@ -840,6 +1066,11 @@ var WebFetch = class extends APIResource {
|
|
|
840
1066
|
params: { url, format: options?.format }
|
|
841
1067
|
});
|
|
842
1068
|
}
|
|
1069
|
+
async search(q, options) {
|
|
1070
|
+
return this._get(`/web/search`, {
|
|
1071
|
+
params: { q, count: options?.count }
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
843
1074
|
};
|
|
844
1075
|
|
|
845
1076
|
// src/platforms/x.ts
|
|
@@ -944,7 +1175,14 @@ var ByCrawl = class {
|
|
|
944
1175
|
youtube;
|
|
945
1176
|
dcard;
|
|
946
1177
|
gmaps;
|
|
1178
|
+
google;
|
|
1179
|
+
hackernews;
|
|
947
1180
|
job104;
|
|
1181
|
+
luma;
|
|
1182
|
+
producthunt;
|
|
1183
|
+
trustpilot;
|
|
1184
|
+
ptt;
|
|
1185
|
+
rent591;
|
|
948
1186
|
web;
|
|
949
1187
|
_transport;
|
|
950
1188
|
constructor(options) {
|
|
@@ -970,7 +1208,14 @@ var ByCrawl = class {
|
|
|
970
1208
|
this.youtube = new YouTube(this._transport);
|
|
971
1209
|
this.dcard = new Dcard(this._transport);
|
|
972
1210
|
this.gmaps = new GMaps(this._transport);
|
|
1211
|
+
this.google = new Google(this._transport);
|
|
1212
|
+
this.hackernews = new HackerNews(this._transport);
|
|
973
1213
|
this.job104 = new Job104(this._transport);
|
|
1214
|
+
this.luma = new Luma(this._transport);
|
|
1215
|
+
this.producthunt = new ProductHunt(this._transport);
|
|
1216
|
+
this.trustpilot = new Trustpilot(this._transport);
|
|
1217
|
+
this.ptt = new PTT(this._transport);
|
|
1218
|
+
this.rent591 = new Rent591(this._transport);
|
|
974
1219
|
this.web = new WebFetch(this._transport);
|
|
975
1220
|
}
|
|
976
1221
|
};
|