Coder Social home page Coder Social logo

crawler's Introduction

Краулер для собра данных по ссылке указывающей на нужную категорию:

- делает GET на указанную в аргументе ссылку, получает данные или падает если
  она битая;

- находить секцию с сылкой на пагинацию - и заня максимальное число старниц
делает GET запросы на каждую старницу и собирает их;

- парсинг старницы  заключается в след - супом находить структурур отвечающую
  за пагинцию и перебираем элеенты.

0. GET first
1. calc how many pages, convert first page
2. GET next page and convert (again in many times)
3. all save to csv.
4. df - from csv, and calc in pandas

HTML STRUCT:

tag: body
    tag: div, class = 'layout-internal col-12 js-autosuggest__search-list-container'
        tag:div, class = 'l-content js-l-content clearfix'
            tag: div. class = 'catalog-content'

                #---------------------------------------
                items folder
                
                tag: div, class = 'catalog-main catalog_list'
                    tag: div. class = 'catalog-list clearfix'
                        tag: div, class = 'js-catalog_before-ads'


                #---------------------------------------
                pagination folder, next page link

                tag: div, class = 'pagination js-pages'

                    #---------------------------------------
                    next page link

                    tag: div, class = 'pagination-nav clearfix'
                        tag: a, class = 'pagination-page js-pagination-next'
                            target field: herf ----> contein link to enother page
                    

                    #---------------------------------------
                    total pages count

                    tag: div, class = 'pagination-pages clearfix'
                        tag: span, class = 'pagination-page pagination-page_current'
                            tag: a, class = 'pagination-page'
                                target field: herf ----> contein link to last page
                                marker - text: 'Последняя'


one item struct:
    tag:div, class = 'item item_list js-catalog-item-enum clearfix item-highlight'
        tag: div, class = 'title description-title'
            tag: h3, class = 'description-title-link'
                tag: a, class = 'description-title-link'

                    target field: title ----> contain string with info
        

crawler's People

Contributors

andrewkhodyakov avatar

Stargazers

Alexey Rybalko avatar

Watchers

 avatar

crawler's Issues

Дописать проверку на одинаковость

Дописать проверку на одинаковость загруженного контента, для избегания загрузки циклический одних и тез же страниц, если на backend сайта стоит troattling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.