Skip to main content

A cmd tool for downloading ads and their media content from the Meta Ad Library.

Project description

AdDownloader

Add the description here

Installation

AdDownloader can be installed in three different ways: from source, from a wheel-file, or as a package.

Installing from source or wheel-file

Open a command-line tool (or a terminal) and navigate to your folder with

cd "[path-to-your-project]/AdDownloader"

Once you're inside your repository, to install from source run:

python setup.py install

To install from the wheel-file run:

pip install "dist/AdDownloader-0.1.0.tar.gz"

Installing as a Python package

To install AdDownloader as a Python package run:

pip install "111"

AdDownloader is now installed and can be run!

Usage

Once installed, AdDownloader can be run in two ways: as a command-line tool (CLI) or as a Python package.

AdDownloader as a Python package

  1. Create an AdDownloader instance:
from AdDownloader import adlib_api
from AdDownloader.media_download import start_media_download
 
ads_api = adlib_api.AdLibAPI(your-fb-access-token-here)
  1. Add parameters to your search:
ads.add_parameters(countries = 'BE', start_date = "2023-09-01", end_date = "2023-09-02", search_terms = "pizza", project_name = "test1")

Note that search_terms and search_pages_id are complementary.

  1. Check the parameters and start the download of ads data:
# check the parameters
ads.get_parameters()
data = ads.start_download()
  1. Start the media content retrieval of the ads downloaded in the previous step:
start_media_download(project_name = "test1", nr_ads = 20, data = data)

All the ouput can be found inside the 'output/your-project-name' folder.

AdDownloader as a CLI

  1. Open a cmd/terminal and navigate to your directory with:
cd "[path-to-your-project]/AdDownloader"
  1. Create and activate a virtual environment (venv) with:
///
venv\Scripts\activate.bat
  1. Finally, start the CLI tool with:
python -m AdDownloader.cli

Once the tool is running, more instructions and questions will appear in the cmd/terminal

For further help see the documentation.

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE.txt file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AdDownloader-0.2.1.tar.gz (52.9 kB view hashes)

Uploaded Source

Built Distribution

AdDownloader-0.2.1-py3-none-any.whl (41.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page