Created a G class enum to reference class names returned in search results. As noted in the class doc, this should only be used/updated as a last resort, as class names change frequently. For some instances, such as replacing the tbm tab, it's a lot easier to just replace by header name than attempting to replace it based on how the element is structured. Also updated a few styles to revert the latest styling changes being applied by Google.
17 lines
498 B
Python
17 lines
498 B
Python
from enum import Enum
|
|
|
|
|
|
class GClasses(Enum):
|
|
"""A class for tracking obfuscated class names used in Google results that
|
|
are directly referenced in Whoogle's filtering code.
|
|
|
|
Note: Using these should be a last resort. It is always preferred to filter
|
|
results using structural cues instead of referencing class names, as these
|
|
are liable to change at any moment.
|
|
"""
|
|
main_tbm_tab = 'KP7LCb'
|
|
images_tbm_tab = 'n692Zd'
|
|
|
|
def __str__(self):
|
|
return self.value
|