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'd like to be able to retrieve the HTML/text from a specific tab, however, it seems it's only possible to call get_html() to get the HTML for all the /active/ tabs. I would like to be able to loop through tabs of interest and activate them unfocused so they load the HTML, and then be able to retrieve just that HTML. I have > 600 tabs open, so it's unreasonable to try to activate all of them so I can get all the HTML and then get the ones I want.
Conceptually what I want to do is this:
tabs=client.list_tabs()
my_tabs= [Tab(tab) fortabintabsif"such and such"intab]
fortabinmy_tabs:
client.activate_tab(tab.id, focused=False) # ensure the tab has HTML loadedcontents=client.get_html(tab.id)
do_something(tab, contents)
client.close_tab(tab.id) # or unload -- I wish we could! I'll make a feature request!
All I can do now though is process the current results of get_html() and then close those tabs, refresh and start over.
The text was updated successfully, but these errors were encountered:
I'd like to be able to retrieve the HTML/text from a specific tab, however, it seems it's only possible to call
get_html()
to get the HTML for all the /active/ tabs. I would like to be able to loop through tabs of interest and activate them unfocused so they load the HTML, and then be able to retrieve just that HTML. I have > 600 tabs open, so it's unreasonable to try to activate all of them so I can get all the HTML and then get the ones I want.Conceptually what I want to do is this:
All I can do now though is process the current results of
get_html()
and then close those tabs, refresh and start over.The text was updated successfully, but these errors were encountered: