jamesturk / scrapelib

⛏ a library for scraping unreliable pages
https://jamesturk.github.io/scrapelib/
BSD 2-Clause "Simplified" License
208 stars 40 forks source link

no-op close method so that Scraper can be context manager #209

Closed fgregg closed 1 year ago

fgregg commented 1 year ago

right now

with scrapelib.Scraper(...) as scraper:
    ...

results in a NotImplemented error because when the context is exited, the session tries to close all the associated adapters and the FTPAdapter does not have the method.

jamesturk commented 1 year ago

thanks for this, if you have time to fix the small mypy issues that'd be great, otherwise glad to do it & merge this in soon 👍

fgregg commented 1 year ago

done!