Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WR] vodafone.de #168

Open
4 tasks done
Disane87 opened this issue Jul 12, 2023 · 0 comments
Open
4 tasks done

[WR] vodafone.de #168

Disane87 opened this issue Jul 12, 2023 · 0 comments
Labels
enhancement New feature or request plugin

Comments

@Disane87
Copy link
Owner

Which website do you want to crawl?

http://vodafone.de

What services do they provide?

Contracts (with recurring calculation in a defined interval)

In which industry does the company operate?

Telecommunication (like Vodafone)

If you choose other...

No response

Does the webpage have/needs an authentication?

  • Yes, the website needs an authentication

Do they provide a two factor auth?

  • Yes, the website needs an seconds factor

Would you provide us the credentials (privately)?

  • Yes, I would share my credentials

Are you willing to collaborate to get this scraper up and running?

  • Yes, I would collaborate on this actively.

What color (hex) represents the company?

#E60000

Your recorded code

import url from 'url';
import { createRunner } from '@puppeteer/replay';

export async function run(extension) {
    const runner = await createRunner(extension);

    await runner.runBeforeAllSteps();

    await runner.runStep({
        type: 'setViewport',
        width: 1134,
        height: 1284,
        deviceScaleFactor: 1,
        isMobile: false,
        hasTouch: false,
        isLandscape: false
    });

    await runner.runStep({
        type: 'navigate',
        url: 'https://www.vodafone.de/',
        assertedEvents: [
            {
                type: 'navigation',
                url: 'https://www.vodafone.de/',
                title: ''
            }
        ]
    });
    await runner.runStep({
        type: 'click',
        target: 'main',
        selectors: [
            [
                'aria/MeinVodafone',
                'aria/[role="generic"]'
            ],
            [
                'li.item-myvf span.icon'
            ],
            [
                'xpath///*[@id="top"]/div/header/nav/div/div[2]/div/div/ul[2]/li[2]/a/span[1]'
            ],
            [
                'pierce/li.item-myvf span.icon'
            ]
        ],
        offsetY: 16,
        offsetX: 6.5,
    });
    await runner.runStep({
        type: 'click',
        target: 'main',
        selectors: [
            [
                'aria/Login[role="button"]'
            ],
            [
                '#meinVodafoneOverlay button'
            ],
            [
                'xpath///*[@id="mdd-login-form"]/fieldset/button'
            ],
            [
                'pierce/#meinVodafoneOverlay button'
            ]
        ],
        offsetY: 10,
        offsetX: 27.90625,
        assertedEvents: [
            {
                type: 'navigation',
                url: 'https://www.vodafone.de/meinvodafone/services/',
                title: ''
            }
        ]
    });
    await runner.runStep({
        type: 'click',
        target: 'main',
        selectors: [
            [
                'li:nth-of-type(1) svg.icon-arrow-down-i-xsml'
            ],
            [
                'xpath///*[@id="dashboard:mobile"]/svg[1]'
            ],
            [
                'pierce/li:nth-of-type(1) svg.icon-arrow-down-i-xsml'
            ]
        ],
        offsetY: 7.015625,
        offsetX: 9.5,
    });
    await runner.runStep({
        type: 'click',
        target: 'main',
        selectors: [
            [
                'li:nth-of-type(1) div.tiles > a:nth-of-type(1) svg'
            ],
            [
                'xpath///*[@id="content"]/div[2]/div/div/section/div/div/div/div[3]/div[2]/ul/li[1]/div/div/div[1]/a[1]/div/div[1]/svg'
            ],
            [
                'pierce/li:nth-of-type(1) div.tiles > a:nth-of-type(1) svg'
            ]
        ],
        offsetY: 63.609375,
        offsetX: 22.484375,
        assertedEvents: [
            {
                type: 'navigation',
                url: 'https://www.vodafone.de/meinvodafone/services/ihre-rechnungen/rechnungen',
                title: ''
            }
        ]
    });
    await runner.runStep({
        type: 'click',
        target: 'main',
        selectors: [
            [
                'aria/Mehr anzeigen[role="button"]'
            ],
            [
                '#content button'
            ],
            [
                'xpath///*[@id="billoverviewWrapperId"]/bill-overview-history/bill-history/div/div[2]/div/div/div/div[2]/vf-table-brix/div[2]/div/button'
            ],
            [
                'pierce/#content button'
            ],
            [
                'text/Mehr anzeigen'
            ]
        ],
        offsetY: 10,
        offsetX: 44.375,
    });
    await runner.runStep({
        type: 'click',
        target: 'main',
        selectors: [
            [
                'tr:nth-of-type(1) > td:nth-of-type(4) span:nth-of-type(2) > svg'
            ],
            [
                'xpath///*[@id="billoverviewWrapperId"]/bill-overview-history/bill-history/div/div[2]/div/div/div/div[2]/vf-table-brix/div[2]/table/tbody/tr[1]/td[4]/div/span[2]/svg'
            ],
            [
                'pierce/tr:nth-of-type(1) > td:nth-of-type(4) span:nth-of-type(2) > svg'
            ]
        ],
        offsetY: 13.5,
        offsetX: 22.34375,
    });
    await runner.runStep({
        type: 'click',
        target: 'main',
        selectors: [
            [
                'tr:nth-of-type(1) > td:nth-of-type(5) span:nth-of-type(2) use'
            ],
            [
                'xpath///*[@id="billoverviewWrapperId"]/bill-overview-history/bill-history/div/div[2]/div/div/div/div[2]/vf-table-brix/div[2]/table/tbody/tr[1]/td[5]/div/span[2]/svg/use'
            ],
            [
                'pierce/tr:nth-of-type(1) > td:nth-of-type(5) span:nth-of-type(2) use'
            ]
        ],
        offsetY: 10.5,
        offsetX: 13.45843505859375,
    });

    await runner.runAfterAllSteps();
}

if (process && import.meta.url === url.pathToFileURL(process.argv[1]).href) {
    run()
}
@Disane87 Disane87 added enhancement New feature or request plugin labels Jul 12, 2023
@Disane87 Disane87 changed the title [WR]: vodafone.de [WR] vodafone.de Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin
Projects
None yet
Development

No branches or pull requests

1 participant