refactor(api)!: Unifying log under 1 logger and removing debug parameter

So now you control the logging and the debugging from the shell through the logger with the name 'scrapling'
This commit is contained in:
Karim shoair
2024-12-11 21:41:37 +02:00
parent f30eb6ab6c
commit 193827e27b
16 changed files with 81 additions and 92 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ class TestParserAutoMatch(unittest.TestCase):
</div>
'''
old_page = Adaptor(original_html, url='example.com', auto_match=True, debug=True)
new_page = Adaptor(changed_html, url='example.com', auto_match=True, debug=True)
old_page = Adaptor(original_html, url='example.com', auto_match=True)
new_page = Adaptor(changed_html, url='example.com', auto_match=True)
# 'p1' was used as ID and now it's not and all the path elements have changes
# Also at the same time testing auto-match vs combined selectors
+2 -2
View File
@@ -74,7 +74,7 @@ class TestParser(unittest.TestCase):
</body>
</html>
'''
self.page = Adaptor(self.html, auto_match=False, debug=False)
self.page = Adaptor(self.html, auto_match=False)
def test_css_selector(self):
"""Test Selecting elements with complex CSS selectors"""
@@ -273,7 +273,7 @@ class TestParser(unittest.TestCase):
large_html = '<html><body>' + '<div class="item">' * 5000 + '</div>' * 5000 + '</body></html>'
start_time = time.time()
parsed = Adaptor(large_html, auto_match=False, debug=False)
parsed = Adaptor(large_html, auto_match=False)
elements = parsed.css('.item')
end_time = time.time()