A Node.js scraper for extracting APK information and search results from the APKPure website.
- Fetch Detailed APK Data: Get comprehensive details about a specific APK, including title, rating, version, description, developer, release date, and more.
- Search for APKs: Perform searches on APKPure and retrieve a list of relevant APKs with their essential information.
- Promise-based: Utilizes Promises for clean and asynchronous code flow.
- Error Handling: Includes error handling to gracefully manage potential issues during scraping.
- Make sure you have Node.js and npm (Node Package Manager) installed.
- Install the scraper via npm:
npm install hacxkapkpure
const APKPureScraper = require('hacxkapkpure');
const scraper = new APKPureScraper();
// Fetch detailed APK data by URL
scraper.fetchAPKData('[https://apkpure.com/pubg-mobile-for-android/com.tencent.ig](https://apkpure.com/pubg-mobile-for-android/com.tencent.ig)')
.then(data => {
console.log(data); // { title: 'PUBG MOBILE', rating: '8.7', ... }
})
.catch(error => console.error('Error fetching APK data:', error));
// Search for APKs
scraper.fetchAPKPureListData('free fire')
.then(results => {
console.log(results);
/*
{
author: 'HACXK',
version: '1.0.3',
result: [
{ name: 'Free Fire MAX', developer: 'Garena International I', ...},
{ name: 'PUBG MOBILE', developer: 'Level Infinite', ...},
// ... (more results)
]
}
*/
})
.catch(error => console.error('Error searching for APKs:', error));
-
Parameters:
-
url
(string): The APKPure URL of the app.
-
-
Returns:
- A Promise that resolves with an object containing the detailed APK data.
-
Parameters:
-
query
(string): The search query for APKs.
-
-
Returns:
- A Promise that resolves with an object containing the search results and scraper information.
This project is licensed under the MIT License.
This scraper is for educational and informational purposes only. Please use it responsibly and respect the terms of service of APKPure and the app developers.
**Key Points:**
- **Clear Sections:** The README is divided into clear sections for easy navigation.
- **Badges:** Added badges for npm version and license.
- **Examples:** Included a basic usage example and a reference to an `examples` directory for more comprehensive scenarios.
- **Disclaimer:** Emphasized responsible usage and respect for terms of service.
- **Contribution Guidelines:** Encouraged contributions and outlined how to get involved.