Skip to main content

"A simple library to help a developer who is affiliated with Amazon to automate the process.

Project description

Amazon Affiliate - Scraper Tool

Quickstart

Creating Affiliate URL:

from amazon_affiliate import AmazonAffiliate
import json

def get_amazon_cookies() -> list[dict]:
    with open("www.amazon.com.br.cookies (2).json", "r") as file:
        cookies = json.load(file)
        return cookies

def main() -> None:
    amazon_affiliate = AmazonAffiliate(
        cookies = get_amazon_cookies(),
        origin_url = "https://www.amazon.com.br/",
        headless = False
    )

    affiliate_url = amazon_affiliate.create_affiliate_url("https://www.amazon.com.br/Echo-Dot-5%C2%AA-gera%C3%A7%C3%A3o-Cor-Preta/dp/B09B8VGCR8/?_encoding=UTF8&pd_rd_w=z10q4&content-id=amzn1.sym.52e74d21-088e-4a9d-888d-8b14bf95d4ae&pf_rd_p=52e74d21-088e-4a9d-888d-8b14bf95d4ae&pf_rd_r=6360ZE14T1KEYVFYZMBQ&pd_rd_wg=1fQsD&pd_rd_r=58179dcd-f33a-44a6-9b15-0fd56b159876&ref_=pd_gw_crs_zg_bs_16209062011")

    print(affiliate_url)

if __name__ == "__main__":
    main()

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

amazon_affiliate_scraper-0.2.2.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file amazon_affiliate_scraper-0.2.2.tar.gz.

File metadata

File hashes

Hashes for amazon_affiliate_scraper-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d7c7572624bb15df6e19c1a4cd805835d071da03932a4e8117154ca489ef342b
MD5 b9e4c983bf15fbe779640127e663eab6
BLAKE2b-256 1e2999379898f2d083eaffe89c29b5c4997bbc73df6290b15d0512ee31d914e9

See more details on using hashes here.

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