Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import feedparser
- from etf.models.issue import Issue
- from etf import consts
- def check_for_rnp(inn: str):
- url = "http://zakupki.gov.ru/epz/dishonestsupplier/extendedsearch/rss?searchString=&morphology=on&openMode=USE_DEFAULT_PARAMS&pageNumber=1&sortDirection=false&recordsPerPage=_10&fz94=on&fz223=on&f=on&u=on&customerINN=%s&kpp=&supplierCountryList=1268®ions=&cities=&city=&street=&authorizedOrganizationIds=&inclusionDateFrom=&inclusionDateTo=&sortBy=UPDATE_DATE" % inn
- data = feedparser.parse(url)
- assert data.get('status') == 200
- if len(data['entries']):
- print('Да')
- else:
- print('Нет')
- all_sb_issues = Issue.objects.filter(status_rejection_reason=consts.ISSUE_STATUS_CANCELLED_UNDERWRIER_REJECTION)
- for i in all_sb_issues:
- rnp = check_for_rnp(i.issuer_inn)
- print(i.id, ' - ', i.issuer_inn, ' - ', rnp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement