Negative Content Detection Model to Classify Text of a Website Using Machine Learning Method
DOI:
https://doi.org/10.29207/resti.v10i3.7119Keywords:
machine learning, natural language processing, negative content detection model, text classification, website classificationAbstract
Harmful online content can negatively influence users and create social risks. This study develops a machine learning model to detect harmful website content using Naïve Bayes, K-Nearest Neighbors (KNN), and Support Vector Machine (SVM). The analysis focuses on website text extracted from the HTML Document Object Model (DOM). Four classes were used: gambling, pornography, phishing, and whitelist content. The dataset consisted of 2911 URLs collected from the UT1 Blacklist repository. Text preprocessing and TF-IDF feature extraction with unigram and bigram representations produced 71,967 tokens. Experimental results show that SVM achieved the best performance with 90.50% accuracy on 2821 active URLs. A real-time Flask-based web application was also developed to classify URLs from user input. The findings demonstrate that combining NLP and machine learning provides an effective and practical solution for harmful website content detection.
Downloads
References
P. Meel and D. K. Vishwakarma, “Fake news, rumor, information pollution in social media and web: A contemporary survey of state-of-the-arts, challenges and opportunities,” Expert Syst. Appl., vol. 153, p. 112986, 2020. doi: 10.1016/j.eswa.2019.112986
H. M. Haglan and H. Jasim Ali, “An automatic system for detecting voltage leaks in houses to save people’s lives,” Indones. J. Electr. Eng. Comput. Sci., vol. 21, no. 3, pp. 1485–1492, 2021. doi: 10.11591/ijeecs.v21.i3.pp1485-1492
J. E. Reesen et al., “Do better nights lead to better days? Guided internet-based cognitive behavioral therapy for insomnia in people suffering from a range of mental health problems: Protocol of a pragmatic randomized clinical trial,” Contemp. Clin. Trials, vol. 127, no. December 2022, p. 107122, 2023. doi: https://doi.org/10.1016/j.cct.2023.107122
S. D. Astuti and D. S. F. A. Idola Perdini Putri., “Strategi Komunikasi Program Internet Sehat Dan Aman Kementerian Komunikasi Dan Informatika Republik Indonesia (Studi Kasus Evaluasi Program Incakap Tahun 2015,” J. Komun., vol. 8, no. 1, pp. 25–35, 2016. doi: https://doi.org/10.24912/jk.v8i1.47
H. Chen, Y. Pu, and D. Atkin, “Migration stress, risky Internet uses, and scam victimization: An empirical study among Chinese migrant workers,” Telemat. Informatics, vol. 83, no. July, p. 102022, 2023.doi: 10.1016/j.tele.2023.102022
E. D. Frauenstein and S. Flowerday, “Susceptibility to phishing on social network sites: A personality information processing model,” Comput. Secur., vol. 94, p. 101862, 2020. doi: https://doi.org/10.1016/j.cose.2020.101862
B. Sunaryo, J. F. Rusdi, S. Salam, N. A. Abu, M. Sabar, and N. Agustina, “Tracking technology for tourist behavior,” in AIP Conference Proceedings, 2023, vol. 2691, no. 1, p. 080002. doi: 10.1063/5.0114928
C. M. Annur, “Perjudian, Konten Inernet Negatif Paling Banyak Diadukan Warga,” Katadata Media Work, 2022. [Online]. Available: https://databoks.katadata.co.id/datapublish/2022/08/19/perjudian-konten-internet-negatif-paling-banyak-diadukan-warga. [Accessed: 19-Jan-2023].
International Telecommunication Union (ITU), 2021 Measuring digital development: Facts and figures. 2021. [Online]. Available: https://www.itu.int/en/ITU-D/Statistics/Documents/facts/FactsFigures2021.pdf
D. Kardefelt Winther et al., “Children’s exposure to hate messages and violent images online,” UNICEF Innocenti – Glob. Off. Res. Foresight, pp. 1–8, 2023. [Online]. Available: https://www.unicef.org/innocenti/documents/childrens-exposure-hate-messages-and-violent-images-online
Sumsub, “iGaming Fraud Increased 64 % YoY : Sumsub Shares Alarming Data in 2024 iGaming Fraud Report,” PR Newswire, 2024. [Online]. Available: https://www.prnewswire.com/news-releases/igaming-fraud-increased-64-yoy-sumsub-shares-alarming-data-in-2024-igaming-fraud-report-302151125.html. [Accessed: 02-Oct-2025].
C. Hooper, “2025 iGaming fraud prevention guide : trends , types , and regulations,” Veriff, 2025. [Online]. Available: https://www.veriff.com/fraud/learn/igamingfraud. [Accessed: 02-Oct-2025].
“What is online gambling fraud, and how can it be prevented?,” ComplyAdvantage, 2024. [Online]. Available: https://complyadvantage.com/insights/online-gambling-fraud/. [Accessed: 02-Oct-2025].
“Online Gambling Global Market Report 2025,” The Business Research Company, 2025. [Online]. Available: https://www.thebusinessresearchcompany.com/report/online-gambling-global-market-report. [Accessed: 02-Oct-2025].
A. Gregory, “Gambling poses huge global threat to public health, experts warn,” The Guardian, 2024. [Online]. Available: https://www.theguardian.com/society/2024/oct/24/gambling-poses-huge-global-threat-to-public-health-experts-warn-lancet-commission. [Accessed: 02-Oct-2025].
A. Amalia, D. Gunawan, M. S. Lydia, and Wesley, “The Identification of Negative Content in Websites by Using Machine Learning Approaches,” 5th Int. Conf. Comput. Eng. Des. ICCED 2019, 2019. doi: 10.1109/ICCED46541.2019.9161105
A. Subasi, M. Balfaqih, Z. Balfagih, and K. Alfawwaz, “A Comparative Evaluation of Ensemble Classifiers for Malicious Webpage Detection,” Procedia Comput. Sci., vol. 194, pp. 272–279, 2021. doi: https://doi.org/10.1016/j.procs.2021.10.082
P. K. Mvula, P. Branco, G. V. Jourdan, and H. L. Viktor, “COVID-19 malicious domain names classification,” Expert Syst. Appl., vol. 204, no. May, 2022. doi: 10.1016/j.eswa.2022.117553
N. Izzah, I. Budi, and S. Louvan, “Classification of Pornographic Content on Twitter Using Support Vector Machine and Naive Bayes,” 2018 4th Int. Conf. Comput. Technol. Appl., pp. 156–160, 2018. doi: 10.1109/CATA.2018.8398674
M. I. Rusydi et al., “Electrooculography signal as alternative method to operate wheelchair based on SVM classifier,” in AIP Conference Proceedings, 2024, vol. 2891, no. 1, p. 020013. doi: https://doi.org/10.1063/5.0200941
S. Bahri, K. Saddami, F. Arnia, and K. Muchtar, “Perbandingan Kinerja Support Vector Machine (SVM) Dalam Mengenali Wajah Menggunakan SURF DAN GLCM,” J. Nas. Tek. Elektro, vol. 8, no. 2, p. 65, 2019. doi: 10.25077/jnte.v8n2.620.2019
B. B. Gupta, K. Yadav, I. Razzak, K. Psannis, A. Castiglione, and X. Chang, “A novel approach for phishing URLs detection using lexical based machine learning in a real-time environment,” Comput. Commun., vol. 175, no. November 2020, pp. 47–57, 2021. doi: 10.1016/j.comcom.2021.04.023
Fabrice Prigent, “Blacklists UT1,” 2023. [Online]. Available: http://dsi.ut-capitole.fr/blacklists/index_en.php. [Accessed: 11-Aug-2023].
U. T. 1 Capitole, “UT1-blacklist,” 2023. [Online]. Available: https://github.com/olbat/ut1-blacklists. [Accessed: 11-Aug-2023].
M. Safaei Pour, C. Nader, K. Friday, and E. Bou-Harb, “A Comprehensive Survey of Recent Internet Measurement Techniques for Cyber Security,” Comput. Secur., vol. 128, p. 103123, 2023. doi: https://doi.org/10.1016/j.cose.2023.103123
N. R. Njeri, “Data Preparation For Machine Learning Modelling,” Int. J. Comput. Appl. Technol. Res., vol. 11, no. 06, pp. 231–235, Jun. 2022. doi: 10.7753/IJCATR1106.1008
M. R. Bingeri, S. Eswaran, and P. Honnavalli, “Malicious Network Traffic Detection in Internet of Things Using Machine Learning,” in Proceedings of Data Analytics and Management, A. Khanna, Z. Polkowski, and O. Castillo, Eds. Singapore: Springer Nature Singapore, 2023, pp. 707–718. doi: https://doi.org/10.1007/978-981-19-7615-5_58
K. Munawaroh and A. Alamsyah, “Performance Comparison of SVM, Naïve Bayes, and KNN Algorithms for Analysis of Public Opinion Sentiment Against COVID-19 Vaccination on Twitter,” J. Adv. Inf. Syst. Technol., vol. 4, no. 2, pp. 113–125, Mar. 2023. doi: 10.15294/jaist.v4i2.59493
S. F. Ahmed et al., “Deep learning modelling techniques: current progress, applications, advantages, and challenges,” Artif. Intell. Rev., vol. 56, no. 11, pp. 13521–13617, Nov. 2023. doi: https://doi.org/10.1007/s10462-023-10466-8
S. K. Tripathy, R. Singh, R. Srivastava, A. K. Bhoi, and S. K. Satapathy, “Datasets BT - Advances in Human Activity Detection and Recognition (HADR) Systems,” Synthesis Lectures on Computer Science, Eds. Cham: Springer Nature Switzerland, 2024, pp. 33–57. doi: 10.1007/978-3-031-51660-3
J. F. Rusdi et al., “Dataset smartphone usage of international tourist behavior,” Data Br., vol. 27, p. 104610, Dec. 2019. doi:
K. H. Cheung and J. Miši, “On virtual private networks security design issues,” Comput. Networks, vol. 38, no. 2, pp. 165–179, 2002. doi: 10.1016/S1389-1286(01)00256-0
W. W. Daniel, Biostatistics: A Foundation for Analysis in the Health Sciences., vol. 44, no. 1. 1988.
T. Kudo, T. Yamamoto, and T. Watanabe, “Three-Step Master Data Creation Method from Big Data: Scraping, Semi-Structuring, and Extraction,” Procedia Comput. Sci., vol. 207, no. Kes, pp. 360–369, 2022. doi: https://doi.org/10.1016/j.procs.2022.09.070
Y. A. Mahmood and B. Mahmood, “A Web Scraper for Data Mining Purposes,” Sistemasi, vol. 13, no. 3, p. 1243, 2024. doi:
H. N. Prasetyo, R. Sarno, D. R. Wijaya, R. Budiraharjo, I. Waspada, and K. R. Sungkono, “Data of dwelling time process at container terminal : Multi-perspective based dataset,” Data Br., no. xxxx, p. 110906, 2024. doi: 10.1016/j.dib.2024.110906
B. Sunaryo, M. I. Rusydi, A. Hazmi, and M. Sasaki, “A Systematic Literature Review of Automation Quality of Service in Computer Networks: Research Trends, Datasets, and Methods,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 7, no. 2, pp. 353–366, Mar. 2023. doi: 10.29207/resti.v7i2.4810
Y. Setiawan, N. Ulfa Maulidevi, and K. Surendro, “The Optimization of n-Gram Feature Extraction Based on Term Occurrence for Cyberbullying Classification,” Data Sci. J., vol. 23, no. 1, pp. 1–21, May 2024. doi: 10.5334/dsj-2024-031
J. Zhou, Z. Ye, S. Zhang, Z. Geng, N. Han, and T. Yang, “Investigating response behavior through TF-IDF and Word2vec text analysis: A case study of PISA 2012 problem-solving process data,” Heliyon, vol. 10, no. 16, p. e35945, Aug. 2024. doi: https://doi.org/10.1016/j.heliyon.2024.e35945
M. Ahmadi, M. Khajavi, A. Varmaghani, A. Ala, K. Danesh, and D. Javaheri, “Leveraging large language models for cybersecurity: enhancing SMS spam detection with robust and context-aware text classification,” Cyber-Physical Syst., pp. 1–27, Sep. 2025. doi: 10.48550/arXiv.2502.11014
Y. Chen, R. Zheng, A. Zhou, S. Liao, and L. Liu, “Automatic Detection of Pornographic and Gambling Websites Based on Visual and Textual Content Using a Decision Mechanism,” Sensors, vol. 20, no. 14, p. 3989, Jul. 2020. doi: https://doi.org/10.3390/s20143989
B. Sunaryo, M. I. Rusydi, A. Hazmi, and R. A. Ramlee, “Real-Time Mining of Router Domain Logs for Temporal and Behavioural Analysis in Smart Network Environments,” in 2025 5th International Conference of Science and Information Technology in Smart Administration (ICSINTESA), 2025, pp. 137–142. doi: 10.1109/ICSINTESA68165.2025.11413661
Downloads
Published
Issue
Section
License
Copyright in each article belongs to the author
- The author acknowledges that the RESTI Journal (System Engineering and Information Technology) is the first publisher to publish with a license Creative Commons Attribution 4.0 International License.
- Authors can enter writing separately, arrange the non-exclusive distribution of manuscripts that have been published in this journal into other versions (eg sent to the author's institutional repository, publication in a book, etc.), by acknowledging that the manuscript has been published for the first time in the RESTI (Rekayasa Sistem dan Teknologi Informasi) journal ;





