|
| 1 | +'use strict'; /*jslint node:true es9:true*/ |
| 2 | + |
| 3 | +const base_tools = ['search_engine', 'scrape_as_markdown']; |
| 4 | + |
| 5 | +export const GROUPS = { |
| 6 | + ECOMMERCE: { |
| 7 | + id: 'ecommerce', |
| 8 | + name: 'E-commerce', |
| 9 | + description: 'Retail and marketplace datasets for product intel.', |
| 10 | + tools: [ |
| 11 | + ...base_tools, |
| 12 | + 'web_data_amazon_product', |
| 13 | + 'web_data_amazon_product_reviews', |
| 14 | + 'web_data_amazon_product_search', |
| 15 | + 'web_data_walmart_product', |
| 16 | + 'web_data_walmart_seller', |
| 17 | + 'web_data_ebay_product', |
| 18 | + 'web_data_homedepot_products', |
| 19 | + 'web_data_zara_products', |
| 20 | + 'web_data_etsy_products', |
| 21 | + 'web_data_bestbuy_products', |
| 22 | + 'web_data_google_shopping', |
| 23 | + ], |
| 24 | + }, |
| 25 | + SOCIAL_MEDIA: { |
| 26 | + id: 'social', |
| 27 | + name: 'Social Media', |
| 28 | + description: 'Social networks, UGC platforms, and creator insights.', |
| 29 | + tools: [ |
| 30 | + ...base_tools, |
| 31 | + 'web_data_linkedin_person_profile', |
| 32 | + 'web_data_linkedin_company_profile', |
| 33 | + 'web_data_linkedin_job_listings', |
| 34 | + 'web_data_linkedin_posts', |
| 35 | + 'web_data_linkedin_people_search', |
| 36 | + 'web_data_instagram_profiles', |
| 37 | + 'web_data_instagram_posts', |
| 38 | + 'web_data_instagram_reels', |
| 39 | + 'web_data_instagram_comments', |
| 40 | + 'web_data_facebook_posts', |
| 41 | + 'web_data_facebook_marketplace_listings', |
| 42 | + 'web_data_facebook_company_reviews', |
| 43 | + 'web_data_facebook_events', |
| 44 | + 'web_data_tiktok_profiles', |
| 45 | + 'web_data_tiktok_posts', |
| 46 | + 'web_data_tiktok_shop', |
| 47 | + 'web_data_tiktok_comments', |
| 48 | + 'web_data_x_posts', |
| 49 | + 'web_data_youtube_profiles', |
| 50 | + 'web_data_youtube_comments', |
| 51 | + 'web_data_youtube_videos', |
| 52 | + 'web_data_reddit_posts', |
| 53 | + ], |
| 54 | + }, |
| 55 | + BROWSER: { |
| 56 | + id: 'browser', |
| 57 | + name: 'Browser Automation', |
| 58 | + description: 'Bright Data Scraping Browser tools for automation.', |
| 59 | + tools: [ |
| 60 | + ...base_tools, |
| 61 | + 'scraping_browser_navigate', |
| 62 | + 'scraping_browser_go_back', |
| 63 | + 'scraping_browser_go_forward', |
| 64 | + 'scraping_browser_snapshot', |
| 65 | + 'scraping_browser_click_ref', |
| 66 | + 'scraping_browser_type_ref', |
| 67 | + 'scraping_browser_screenshot', |
| 68 | + 'scraping_browser_network_requests', |
| 69 | + 'scraping_browser_wait_for_ref', |
| 70 | + 'scraping_browser_get_text', |
| 71 | + 'scraping_browser_get_html', |
| 72 | + 'scraping_browser_scroll', |
| 73 | + 'scraping_browser_scroll_to_ref', |
| 74 | + ], |
| 75 | + }, |
| 76 | + FINANCE: { |
| 77 | + id: 'finance', |
| 78 | + name: 'Finance Intelligence', |
| 79 | + description: 'Company, financial, and location intelligence datasets.', |
| 80 | + tools: [ |
| 81 | + ...base_tools, |
| 82 | + 'web_data_yahoo_finance_business', |
| 83 | + ], |
| 84 | + }, |
| 85 | + BUSINESS: { |
| 86 | + id: 'business', |
| 87 | + name: 'Business Intelligence', |
| 88 | + description: 'Company, and location intelligence datasets.', |
| 89 | + tools: [ |
| 90 | + ...base_tools, |
| 91 | + 'web_data_crunchbase_company', |
| 92 | + 'web_data_zoominfo_company_profile', |
| 93 | + 'web_data_google_maps_reviews', |
| 94 | + 'web_data_zillow_properties_listing', |
| 95 | + 'web_data_booking_hotel_listings', |
| 96 | + ], |
| 97 | + }, |
| 98 | + RESEARCH: { |
| 99 | + id: 'research', |
| 100 | + name: 'Research', |
| 101 | + description: 'App stores, news, and developer data feeds.', |
| 102 | + tools: [ |
| 103 | + ...base_tools, |
| 104 | + 'web_data_github_repository_file', |
| 105 | + 'web_data_reuter_news', |
| 106 | + ], |
| 107 | + }, |
| 108 | + APP_STORES: { |
| 109 | + id: 'app_stores', |
| 110 | + name: 'App stores', |
| 111 | + description: 'App stores.', |
| 112 | + tools: [ |
| 113 | + ...base_tools, |
| 114 | + 'web_data_google_play_store', |
| 115 | + 'web_data_apple_app_store', |
| 116 | + ], |
| 117 | + }, |
| 118 | + TRAVEL: { |
| 119 | + id: 'travel', |
| 120 | + name: 'Travel', |
| 121 | + description: 'Travel information.', |
| 122 | + tools: [ |
| 123 | + ...base_tools, |
| 124 | + 'web_data_booking_hotel_listings', |
| 125 | + ], |
| 126 | + }, |
| 127 | + ADVANCED_SCRAPING: { |
| 128 | + id: 'advanced_scraping', |
| 129 | + name: 'Advanced Scraping', |
| 130 | + description: 'Higher-throughput scraping utilities and batch helpers.', |
| 131 | + tools: [ |
| 132 | + ...base_tools, |
| 133 | + 'search_engine_batch', |
| 134 | + 'scrape_batch', |
| 135 | + 'scrape_as_html', |
| 136 | + 'extract', |
| 137 | + 'session_stats', |
| 138 | + ], |
| 139 | + }, |
| 140 | + CUSTOM: { |
| 141 | + id: 'custom', |
| 142 | + name: 'Custom', |
| 143 | + description: 'Placeholder for user-defined tool selections.', |
| 144 | + tools: [...base_tools], |
| 145 | + }, |
| 146 | +}; |
| 147 | + |
| 148 | +export const get_all_group_ids = ()=>{ |
| 149 | + return Object.values(GROUPS) |
| 150 | + .map(group=>group.id) |
| 151 | + .filter(id=>id!=='custom'); |
| 152 | +}; |
| 153 | + |
| 154 | +export const get_total_tool_count = ()=>{ |
| 155 | + const all_tools = new Set(); |
| 156 | + for (let group of Object.values(GROUPS)) |
| 157 | + for (let tool of group.tools) |
| 158 | + all_tools.add(tool); |
| 159 | + return all_tools.size; |
| 160 | +}; |
| 161 | + |
| 162 | +export {base_tools}; |
0 commit comments