summaryrefslogtreecommitdiff
path: root/app/test.py
blob: a0481e2dff91e0081b26cf89c28fb7db918edbbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import acmespb
import sys
from pprint import pprint

if __name__ == "__main__":
    #pprint(acmespb.trade_names("Марена красильная корневища и корни"))
    page = 1
    pages = 0
    target_url = None
    while pages == 0 or page <= pages:
        target_url, pages, offers = acmespb.offers("Верошпирон", page=page, target_url=target_url)
        print("[%d] pages=%d, target_url=%s" % (page, pages, target_url))
        for offer in offers:
            print(offer.as_dict())
        page += 1