You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I received statistics on website downloads when using selectolax
The most popular functions were as follows (by total time and number of calls):
css_first (3,2 million calls)
text (2,8 million calls)
The library tests (at this site) also use "css_first" all the time
I looked at the source text css_first. The function first gets all the nodes on the page and then takes the first node. It takes a very long time. Can you optimize this process?
and another question
This function is called many times within my program:
def first_text(query, deep, default=None)
link = item.css_first(query)
if link is not None:
return link.text(deep=deep, strip=True)
else:
return default
Could you add this function to the class Node (wth self instead of query)? (in all my parsing programs the parameter "strip" has a value True and I don't understand why you set the default value to False)
The text was updated successfully, but these errors were encountered:
I received statistics on website downloads when using selectolax
The most popular functions were as follows (by total time and number of calls):
The library tests (at this site) also use "css_first" all the time
I looked at the source text css_first. The function first gets all the nodes on the page and then takes the first node. It takes a very long time. Can you optimize this process?
and another question
This function is called many times within my program:
def first_text(query, deep, default=None)
link = item.css_first(query)
if link is not None:
return link.text(deep=deep, strip=True)
else:
return default
Could you add this function to the class Node (wth self instead of query)? (in all my parsing programs the parameter "strip" has a value True and I don't understand why you set the default value to False)
The text was updated successfully, but these errors were encountered: