webpage

Get text from web page to string

自作多情 提交于 2019-11-26 16:24:00
I'm new to Android and I want to get the whole text from a web page to a string. I found a lot of questions like this but as I said I'm new to Android and I don't know how to use them in my app. I'm getting errors. Only one method I managed to get it to work, it uses WebView, and JavaScript and it is slow as hell. Can someone please tell me some other way to do this or how to speed up the WebView since I don't use it at all for viewing content. By the way, I've added the following code to speed up WebView webView.getSettings().setJavaScriptEnabled(true); webView.getSettings()

How to load external webpage inside WebView

这一生的挚爱 提交于 2019-11-26 15:44:28
My problem is that the webpage is not loaded inside the webview. mWebview.loadUrl("http://www.google.com"); launches the web browser... This is the code of my activity: import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class Main extends Activity { private WebView mWebview; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mWebview = new WebView(this); mWebview.loadUrl("http://www.google.com"); setContentView(mWebview); } } I added the required permission in the Manifest: <uses-permission android:name=

How to use greasemonkey to selectively remove content from a website

守給你的承諾、 提交于 2019-11-26 15:27:19
The content I am trying to modify has a series of <div> entries, and within each of these are other <div> entries. There are no id tags to help here. What I want the script to do is inspect the content of each of these <div> entries and look for some text. This will be used to determine whether the whole '' entry is deleted/hidden or not. Is this possible? How? Below is an example. There are several of these in the page, and I want to delete/hide the ones where the text inside the <div class="foo bar"> tags say "Yes." So in this example, this whole thing would get deleted/hidden. <div class=

Reading Web Pages using Excel VBA

谁都会走 提交于 2019-11-26 14:39:26
问题 I want to read web pages using Excel VBA. How do I carry out this task? Is it even possible? 回答1: Coming from Excel 2003, yes this is possible - you may use the SHDocVw.InternetExplorer and MSHTML.HTMLDocument objects to call a web page, gain control over and interact with the DOM object. After creating references to Microsoft HTML Object Library (...\system32\MSHTML.TLB) and Microsoft Internet Control (...\system32\ieframe.dll) you can play with the following example: Sub Test() Dim Browser

JavaScript at bottom/top of web page?

冷暖自知 提交于 2019-11-26 12:57:06
I was just using the plugin "Yslow" for Mozilla Firefox, and it told me that I should put JavaScript at the bottom. I have heard this before but haven't really thought about it too much. Is there really an advantage in putting JavaScript at the bottom of a web page compared to the top? It'll allow the web page to load visibly before executing JavaScript, which makes sense for things like Google Analytics, which don't need to happen before the page loads. You may also want to look into things like jQuery, prototype, etc and attach to the "ready" handler, which executes JavaScript code after the

Getting all visible text from a webpage using Selenium

*爱你&永不变心* 提交于 2019-11-26 10:59:30
问题 I\'ve been googling this all day with out finding the answer, so apologies in advance if this is already answered. I\'m trying to get all visible text from a large number of different websites. The reason is that I want to process the text to eventually categorize the websites. After a couple of days of research, I decided that Selenium was my best chance. I\'ve found a way to grab all the text, with Selenium, unfortunately the same text is being grabbed multiple times: from selenium import

How to change page in jQuery mobile (1.4 beta)?

雨燕双飞 提交于 2019-11-26 10:31:49
I am reading the docs that $.mobile.changePage has been deprecated. But it doesn't say in favor of what, or what can I use instead. Is there a new API documentation page for this? I used to use $.mobile.changePage("index.html", {reloadPage:true}); but it seems that adding reloadPage:true the page breaks As of jQuery Mobile 1.4 , $.mobile.changePage() is deprecated and replaced with: $(":mobile-pagecontainer").pagecontainer("change", "target", { options }); Shortened ... $.mobile.pageContainer.pagecontainer("change", "target", { options }); Even shorter ... (1) $("body").pagecontainer("change",

Convert webpage to image from ASP.NET

旧街凉风 提交于 2019-11-26 10:20:32
I would like to create a function in C# that takes a specific webpage and coverts it to a JPG image from within ASP.NET. I don't want to do this via a third party or thumbnail service as I need the full image. I assume I would need to somehow leverage the webbrowser control from within ASP.NET but I just can't see where to get started. Does anyone have examples? Keith Adler Ok, this was rather easy when I combined several different solutions: These solutions gave me a thread-safe way to use the WebBrowser from ASP.NET: http://www.beansoftware.com/ASP.NET-Tutorials/Get-Web-Site-Thumbnail-Image

Retrieve image from FTP to webpage

前提是你 提交于 2019-11-26 09:59:23
问题 I have a folder in my ftp server which contains several images. I\'m trying to access and show these images in a webpage like <img src=\"ftp://my_ftp_ip_address/Images/imagename.jpg\"/> But it asks for an FTP username and password. How can I achieve this? Also is it possible to do the same using Java? 回答1: With the latest versions of web browsers (Chrome 59, Firefox 61), you cannot even use ftp:// URL to retrieve an image. And it was never a good solution anyway. The correct solution is to

How can I take a screenshot/image of a website using Python?

大兔子大兔子 提交于 2019-11-26 08:57:54
问题 What I want to achieve is to get a website screenshot from any website in python. Env: Linux 回答1: On the Mac, there's webkit2png and on Linux+KDE, you can use khtml2png. I've tried the former and it works quite well, and heard of the latter being put to use. I recently came across QtWebKit which claims to be cross platform (Qt rolled WebKit into their library, I guess). But I've never tried it, so I can't tell you much more. The QtWebKit links shows how to access from Python. You should be