Skip to content

Instantly share code, notes, and snippets.

@Suor
Created February 1, 2020 17:36
Show Gist options
  • Save Suor/b4f8c4d9a353ea29a918dc7381aa6a80 to your computer and use it in GitHub Desktop.
Save Suor/b4f8c4d9a353ea29a918dc7381aa6a80 to your computer and use it in GitHub Desktop.
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