نوع مقاله : مقاله پژوهشی
نویسندگان
1 گروه مدیریت فناوری اطلاعات، واحد تهران مرکزی، دانشگاه آزاد اسلامی، تهران، ایران.
2 گروه مدیریت صنعتی، واحد تهران مرکزی، دانشگاه آزاد اسلامی، تهران، ایران
چکیده
امروزه پایداری و تابآوری کدهای برداشت اطلاعات از وب یکی از چالشهای اصلی در حوزه مهندسی نرمافزار و دادهکاوی است، بهویژه زمانی که وبسایتهای هدف از ساختارهای پویا استفاده میکنند. کتابخانه سلنیوم بهعنوان یکی از پرکاربردترین ابزارهای برداشت اطلاعات وب، در بسیاری از پروژههای صنعتی و پژوهشی مورد استفاده قرار میگیرد، اما حساسیت بالای آن نسبت به تغییر عناصر صفحه اغلب منجر به بروز خطا، توقف سیستم و نیاز به اصلاحات مکرر کد میشود. این پژوهش با ارائه روش نوین مبتنی بر استفاده همزمان از «انتخابگرهای پویا» و یک لایه تصمیمگیری مبتنی بر هوش مصنوعی، رویکردی کاربردی، قابل اعتماد و منعطف برای مقاومسازی کدهای سلنیوم ارائه میدهد. در این مطالعه، برداشت اطلاعات از وبسایت دیجیکالا در بازه زمانی دو ساله، با تناوب هفتگی انجام شد. روش پیشنهادی با تحلیل رفتار المانهای صفحه، بهطور خودکار انتخابگرهای مناسب را جایگزین و در صورت خطا از چندین استراتژی هوشمند استفاده میکند. این رویکرد پایداری و اطمینان اجرای سلنیوم را در برابر تغییرات سایت افزایش داده و میتواند الگویی کارآمد برای سامانههای جمعآوری داده از وب در محیطهای پویا باشد. نتایج تجربی نشان داد هنگامی که از روش پیشنهادی جهت انتخاب خودکار و هوشمند المانهای HTML استفاده شد، تمامی برداشتها بدون خطا و بدون نیاز به تغییر دستی کد انجام شدند. اما هنگام عدم استفاده از این روش، 67 برداشت نیازمند اصلاح مستقیم انتخابگرهای کد توسط توسعهدهنده بودند. این اختلاف عملکرد نشان میدهد که استفاده از مدل ارائهشده باعث کاهش چشمگیر هزینه نگهداری، زمان توسعه و ریسک شکست اجرای عملیات استخراج داده میشود.
کلیدواژهها
موضوعات
عنوان مقاله [English]
Using dynamic selectors and artificial intelligence to harden web data retrieval codes
نویسندگان [English]
- farnaz taghizadeh kourayem 1
- Mohammadreza Kabaranzad Ghadim 2
- Seyed Abdollah Amin Mousavi 1
1 Department of Information Technology Management, Central Tehran Branch, Islamic Azad University, Tehran, Iran.
2 Department of industrial Management, Central Tehran Branch, Islamic Azad University, Tehran, Iran
چکیده [English]
Today, the sustainability and resilience of web data extraction codes are one of the main challenges in software engineering and data mining, particularly when target websites use dynamic structures. selenium, as one of the most widely used libraries for web scraping, is utilized in many industrial and research projects; however, its high sensitivity to changes in web page elements often results in errors, system interruptions, and the need for frequent code modifications. This research presents a novel method that combines “dynamic selectors” with an AI-based decision-making layer to provide a functional, reliable and flexible approach for strengthening selenium-based code. In this study, data was collected from the Digikala website over a two-year period with weekly intervals. The proposed method analyzes the behavior of page elements, automatically replaces the appropriate selectors, and applies multiple intelligent fallback strategies in case of failure. This approach increases the stability and reliability of selenium execution against website changes and can serve as an efficient model for web data collection systems operating in dynamic environments. Experimental results showed that when the proposed method was used for automatic and intelligent selection of HTML elements, all data extraction operations were completed without errors and without requiring manual code modifications. However, when the method was not applied, 67 extraction attempts required direct selector corrections by the developer. This performance difference demonstrates that the presented model significantly reduces maintenance costs, development time, and the risk of extraction process failure.
کلیدواژهها [English]
- Artificial Intelligence
- HTML Code Hardening
- HTML Structure of Web Pages
- Selenium Library
- Web Data Retrieval