Website anti-banning method and system capable of limiting access times
A technology of number of visits and websites, which is applied in the field of computer networks and can solve problems such as limited number of visits
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 2
[0028] Such as figure 1 As shown, this embodiment provides a website anti-blocking method with a limit on the number of visits, and the method includes the following steps,
[0029] S1. The target browser uses selenium to access the login page of the website;
[0030] S2. After the website login page is loaded, obtain the prepared user name and password cyclically, and fill the obtained user name and password into the website login page;
[0031] S3. Log in to the website, obtain the cookie of the login result, and return the response body;
[0032] S4, parse the response body, and obtain the content in the set cookie;
[0033] S5. Determine whether the obtained login result cookie is valid, and remove the expired cookie, and save the remaining valid cookie;
[0034] S6. The stored effective cookie is called to directly collect website data.
[0035] In this embodiment, the login page is provided with a login form, and the login form is provided with a user name line and a...
Embodiment 1
[0039] This embodiment provides a website anti-blocking system with a limited number of visits, the system is used to implement the method, and the system includes:
[0040] A crawler tool; the crawler tool is used to automatically control the target browser to use selenium to access the website login page;
[0041] A login information acquisition module; the login information acquisition module is used to cyclically acquire the prepared user name and password, and fill the acquired user name and password into the website login page;
[0042] Result acquisition module; the result acquisition module is used to obtain the cookie of the login result, and returns responsebody;
[0043] Parsing module; the parsing module is used to parse the response body and obtain the content in the set cookie;
[0044] Cookie control module; The Cookie control module is used to judge whether the cookie of the login result is valid, and the expired cookie is removed, and the remaining valid cook...
Embodiment 3
[0049] In this embodiment, an example is used to illustrate the implementation process of the method.
[0050] The target website imposes login verification restrictions on the access data, and limits the number of visits to the target data to 300 times per day, and an error page will be returned if the number of visits exceeds.
[0051] 1. Write the java-selenium driver, call selenium, and use webdriver to access the website login page;
[0052] 2. When the page is loaded, the user name and password in the database are obtained cyclically, and filled into the login form;
[0053] 3. Log in to the website and get the cookie of the login result;
[0054] 4. Parse the response body and submit the content in the set cookie to the cookie control module;
[0055] 5. The cookie control module judges the validity of the current cookie, removes the expired cookie, saves the cookie to the mogodb database, and dynamically adds the cookie to the cookie pool. When the number of cookie r...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com