Skip to content

Instantly share code, notes, and snippets.

View kami4ka's full-sized avatar
🚀
To the Cloud!

Oleg Kulyk kami4ka

🚀
To the Cloud!
View GitHub Profile
@kami4ka
kami4ka / amazon_batch_error_handling.js
Last active December 21, 2021 18:08
Amazon batch scraper with error handling. ScrapingAnt API used to get data.
/**
* Amazon Batch Scraper - create file with a list of keywords and all products would be scraped in one CSV file
*
* Installation instructions:
* npm install "@scrapingant/amazon-proxy-scraper"
* npm install json2csv
*
*/
const ProductsScraper = require("@scrapingant/amazon-proxy-scraper");
const cheerio = require('cheerio');
const ScrapingAnt = require('@scrapingant/scrapingant-client');
const API_KEY = '<YOUR_SCRAPINGANT_API_KEY>';
const URL_TO_SCRAPE = 'https://ra.co/events/1479360';
const BASE_URL = 'https://ra.co';
const client = new ScrapingAnt({ apiKey: API_KEY });
main()
@kami4ka
kami4ka / parser.py
Last active October 7, 2022 13:29
Medindia ScrapingAnt parser
import requests
from bs4 import BeautifulSoup
YOUR_API_KEY = '<YOUR_SCRAPINGANT_API_KEY>'
def get_page(page_url):
response = requests.get(url='https://api.scrapingant.com/v2/general', params={'browser': False, 'url': page_url, 'x-api-key': YOUR_API_KEY, 'proxy_country': 'IN'})
content = response.content.decode('windows-1252')
@kami4ka
kami4ka / tech-task.md
Last active January 15, 2025 18:07
Backend Position Technical Task

Backend Position Technical Task

Implement REST API that allows users to:

  • Lookup for a particular IP address info via https://ipwhois.io/ and store in to DB
  • Response with a stored lookup info from DB in case the spefic IP was already searched (DB-caching)
  • Remove cached result by IP
  • Cache should be auto-removed after TTL of 60 seconds, so only the cache result would be updated each 60 seconds for the particular IP address

Required parts

  • SQL or noSQL database or file
@kami4ka
kami4ka / qa_test_task.md
Last active May 8, 2023 22:12
Systima QA test task
@kami4ka
kami4ka / test_task.md
Last active February 19, 2025 09:17
ScrapingAnt Backend Test Task

ScrapingAnt's Backend Test Task

Task Description

You need to implement a web scraping script that extracts product data from an e-commerce website books.toscrape.com and stores the extracted data in a database.

The script should:

  • Scrape product details (title, price, availability, quantity in stock) from multiple pages of a given website.
  • Use Asyncio to efficiently fetch data from multiple pages in parallel.
  • Store the extracted data in a database (your choice) deployed as a separate Docker container.