Skip to content

Instantly share code, notes, and snippets.

@Suor
Created Feb 1, 2020
Embed
What would you like to do?
aioscrape perekrestok example
from aioscrape import settings, fetch, run
from parsechain import C
async def scrape():
resp = await fetch('https://www.perekrestok.ru/')
print(resp.css('.xf-product').map({
'id': C.attr('data-id').int,
'name': C.attr('data-gtm-product-name')
}))
def main():
with settings():
run(scrape())
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment