Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shmygol/ad-scraper

Fetch context ads
https://github.com/shmygol/ad-scraper

Last synced: about 2 months ago
JSON representation

Fetch context ads

Awesome Lists containing this project

README

        

# ad-scraper
Uses Nokogiri to fetch context ads from Google, Bing and Yahoo platforms by the given list of keywords for marketing analysis. Inspired by https://github.com/caser/google-ad-scraper

## Code Example
```
require 'ad_scraper'
time = Time.new
AdScraper::get_parsed_pages(query_list.split(','), ['yahoo', 'google', 'bing']).each do |page|
puts "==== #{page.platform.upcase} = #{page.query.upcase} ===="
page.ads.each do |ad|
puts
puts 'HEADLINE: ' + ad[:headline].upcase
puts
puts ad[:node].to_s
end
end
```