Giter Site home page Giter Site logo

googleadsanalysis's Introduction

Google Ads Analysis

  • Scraping Google Ads for a webpage

  • Extracting important feature of a Google Ad

Part 1: SeleniumAdScrapper.py - Script uses Selenium (to scrape website that uses JS to render) and save the ads of the page in the directory "image". Initially hard coded url is "speedtest.net". Please change the URL as per your choice.

Part 2: Collab notebook for OCR and feature extraction of the google Ads (image). https://colab.research.google.com/drive/15Ms3yeFxqfVdVPJ-zzXtmF_S9msMGVGJ?usp=sharing

Add/upload the image folder to the current session of the collab.

Run the notebook (There might be prompts(press y/n) while installing libraries). It will loop through all the Ads’ images and do OpenCV easyOCR to find the dominant texts and their location. All the information is saved in the csv.

The last cell tries to extract feature of one ad using SIFT Algo (Scale Invariant Feature Transform).

Refresh the directory of Collab after running the notebook. A data.csv is created containing information of Ads. Column 1 shows the text extracted in an Ad and has the image of that text in pixel matrix.

Steps to follow:

  • Ubuntu Env:
    1. install python
    2. install firefox
    3. pip install -r requirement.txt
    4. run script SeleniumAdScrapper.py
    5. upload the images saved (in image folder saved in saved by previous script) on the collab env
    6. run the collab notebook

googleadsanalysis's People

Contributors

prvnsingh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.