Im looking for a way to read the source only of open tabs on my browser, specifically music.apple.com. What chrome api should I use for this? Ive been searching around their docs but couldn't find anything that looks like what I need.
Related
I want to make a program that keeps track of open websites on Google Chrome on Windows 11 using python. Are there any libraries that can help with this? Metadata such as Duration and When the tab was opened are things that would be preferred as well.
For example, say Google Chrome has these webpages open: YouTube, Gmail, and GitHub. When the script is run, I want the output to be: youtube.com, mail.google.com, and github.com with the corresponding duration and time tab was opened.
I have tried using libraries such as urllib, pyppeteer, requests and selenium however none of these really helped in what I was trying to achieve. Googling this does not help either. I'm looking for a library and/or any example code that would help me, and so that I can research further! Thank you :)
I used a chrome extension to download files on site, I want to know if I can create a Python Selenium script to do the same action like what in chrome extension? is it difficult?
While this is possible it's probably not a great practice...
I am not that comfortable with python or python-selenium;
However I do understand that if it's a web driver then there probably is a way to get this accomplished, look around for Python Selenium file download API on google.
Another aproach would be to make two apps that communicate with eachother - one made with html, css, javascript, php, etc to find the name of a file on a webpage.
Then message this to python (once again not sure how to do this, it's probably on google somewhere) once the file name on the website and website name are passed to python then put them together with something like this (javascript variable joining in context example):
...
var example = pageurl_as_variable + "/" + file_name_as_variable;
some_download_function_defined_else-where(example);
...
then obviously download this as file...
Once again this isn't the best practice and you can't make a chrome extension with python due to security reasons, but as described in the example above you could make an app-hybrid and then run this on the target users computer.
There are a lot of ways to do this with just basic HTML and potentially JavaScript so your better off looking into a way to do it that way...
Here's some links to point you in the right direction:
How can I download a file from a link in HTML?
How can I download a file on a click event using selenium?
(couldn't find anything on passing messages between the apps in my 5-seconds of googling).
I would like to use Chrome's default favicons.
For example (you can simply open them in Chrome):
chrome://theme/IDR_HISTORY_FAVICON
chrome://theme/IDR_EXTENSIONS_FAVICON
chrome://theme/IDR_SETTINGS_FAVICON
chrome://theme/IDR_PRODUCT_LOGO_16
When I used it as an image source nothing happened. Maybe Chrome blocked the access to the icons or this was not the proper way to use the icons. I tried to use "chrome://favicon/", but it didn't work with Extensions and Settings (strange, but it worked with History).
How can I use the built-in favicons as an image?
I would be also grateful if you could get me a full list of the Chrome's favicons, it must be in Chromium's source code, but I have no idea where to look.
(I'm using Chrome 19.0.1084.52)
Is there a browser plugin or an extension that allows the user to view .doc files in browser?
I need to embed in my application, a document viewer. So far, I tried using services like google docs, but this solution doesn't work for our application, because of some security problems.
Do you know about the Office Web Apps? Microsoft developed something similar to Google Docs and you can use the Word Web Application to view Word files. It will pretty much display anything - a lot of editing functions from the offline version are not available though.
If you are just looking for a viewer search for "Word ActiveX Viewer" and you will find plenty (commercial) viewers.
To have IE open the .doc within the browser and not in a separate winword.exe, you need to define the association at client end.
As .doc file is an external resource to HTML, it would download the file into its temp, and then attempt to launch it. It would launch it using the default program that it is associated with.
To control this behavior, please have a look at:
http://www.shaunakelly.com/word/sharing/opendocinie.html
I thought Internet Explorer + Microsoft Office used to do this by default?
I can for sure tell you that other than converting the doc to html you won't get a cross-browser, cross-platform solution.
Since you are saying it's for viewing only, that would seem like the way to go.
I'm developing a chrome extension. I need to get a preview image for each tab. How can I do this?
The Tab API has captureVisibleTab functionthat you can use:
http://code.google.com/chrome/extensions/tabs.html#method-captureVisibleTab
Do a simple search on stackoverflow to see how it works, I have answered many people regarding that feature.
If you want to alter that image after you capture it, then you can use HTML Canvas to do so.
Hope that helped