Сначала надо было прочитать статью Scraping Web Pages With Scrapy и посмотреть ролик (из этой же статьи).
Потом надо было прочитать из документации Scrapy Tutorial. Мальнькая хитрость в том, что видеоролик и пример из статьи - это краткий вариант примера из документации.
У этого же автора есть еще одна статья с видео Recursively Scraping Web Pages with Scrapy... а ещ там есть Sentiment Analysis: Feelings, not Facts с видео... И что еще радует - весь код из примеров есть на github
Однако, руководство написано настолько хорошо, что надо брать за основу примеры оттуда ...тем более, что я его уже прочитал месяца три назад..., так что теперь все должно усваиваться легко. Docs Scrapy Tutorial - первое базовое руководство GitHub Scrapy Tutorial - These are guides contributed by the Scrapy community scrapy.org/community - здесь на странице есть ссылки на wiki
Основной вопрос - Proxy¶
Прежде, чем погрузиться в изучение Scrapy, я хотел найти простой вариант работы со списками прокси. Поиск по документации меня слегка обескуражил (я об этом писал в предыдущих постах о прокси) - разработчики настойчиво предлагали "коммерческие услуги". Однако у меня хватило сообразительности задать в гугл поиск howto scrapy proxy И нашлось сразу несколько библиотек и статей:
Using Scrapy with proxies - article of Mahmoud M. Abdel-Fattah
GitHub scrapy-proxies Random proxy middleware for Scrapy - Processes Scrapy requests using a random proxy from list to avoid IP ban and improve crawling speed. Get your proxy list from sites like http://www.hidemyass.com/ (copy-paste into text file and reformat to http://host:port format)
GitHub scrapy-proxynova- Use scrapy with a list of proxies generated from proxynova.com The first run will generate the list of proxies from http://proxynova.com and store it in the cache. It will individually check each proxy to see if they work and remove the ones that timed out or cannot connect to.
How to set a proxy in code? - google code group
Scrapy – Web Crawling with a Proxy Network
Scrapy: Run Using TOR and Multiple Agents
Scrapy: Run Using TOR and Multiple Agents Part 2 gitweb.torproject.org
Using Scrapy with proxies - article of Mahmoud M. Abdel-Fattah
GitHub scrapy-proxies Random proxy middleware for Scrapy - Processes Scrapy requests using a random proxy from list to avoid IP ban and improve crawling speed. Get your proxy list from sites like http://www.hidemyass.com/ (copy-paste into text file and reformat to http://host:port format)
GitHub scrapy-proxynova- Use scrapy with a list of proxies generated from proxynova.com The first run will generate the list of proxies from http://proxynova.com and store it in the cache. It will individually check each proxy to see if they work and remove the ones that timed out or cannot connect to.
How to set a proxy in code? - google code group
Scrapy – Web Crawling with a Proxy Network
Scrapy: Run Using TOR and Multiple Agents
Scrapy: Run Using TOR and Multiple Agents Part 2 gitweb.torproject.org
Посты чуть ниже также могут вас заинтересовать
Комментариев нет:
Отправить комментарий