webpage

Download the entire webpage

前提是你 提交于 2019-12-21 23:56:30
问题 There are ways to download an entire webpage, using HTMLEditorKit . However, I need to download an entire webpage which needs scrolling in order to load its entire content . This technology is achieved most commonly through JavaScript bundled with Ajax. Q.: Is there a way to trick the destined webpage, using only Java code , in order to download its full content? Q.2: If this is not possible only with Java, then is it possible in combination with JavaScript? Simple notice, what I wrote:

Web page Capture and save to image using phantomjs lib

夙愿已清 提交于 2019-12-21 06:41:08
问题 i was searching google to get any js lib which can capture the image of any website or url. i came to know that phantomjs library can do it. here i got a small code which capture and convert the github home page to png image if anyone familiar with phantomjs then please tell me what is the meaning of this line var page = require('webpage').create(); here i can give any name instead of webpage ? if i need to capture the portion of any webpage then how can i do it with the help of this library.

Web page Capture and save to image using phantomjs lib

有些话、适合烂在心里 提交于 2019-12-21 06:40:09
问题 i was searching google to get any js lib which can capture the image of any website or url. i came to know that phantomjs library can do it. here i got a small code which capture and convert the github home page to png image if anyone familiar with phantomjs then please tell me what is the meaning of this line var page = require('webpage').create(); here i can give any name instead of webpage ? if i need to capture the portion of any webpage then how can i do it with the help of this library.

Extract Meta Keywords From Webpage?

拈花ヽ惹草 提交于 2019-12-21 04:18:24
问题 I need to extract the meta keywords from a web page using Python. I was thinking that this could be done using urllib or urllib2, but I'm not sure. Anyone have any ideas? I am using Python 2.6 on Windows XP 回答1: lxml is faster than BeautifulSoup (I think) and has much better functionality, while remaining relatively easy to use. Example: 52> from urllib import urlopen 53> from lxml import etree 54> f = urlopen( "http://www.google.com" ).read() 55> tree = etree.HTML( f ) 61> m = tree.xpath( "/

How to design a webpage to be print friendly?

白昼怎懂夜的黑 提交于 2019-12-20 23:25:15
问题 What are the right sizes for a webpage to be printed on A4 size paper? What other stuff should be considered? *inline CSS is preferred in this case Clarification: This web-page's only propose is to be printed, since it is a receipt. Clarification # 2: This web-page is for the internal use of the company I'm working for. They would like it to look professionally designed receipt. Clarification # 3: This web-page must be printed on one page -of A4 size- only. 回答1: Answer I'd recommend using two

stop scrolling of webpage with jquery

时光怂恿深爱的人放手 提交于 2019-12-19 11:22:14
问题 I am using a query bumpbox plugin with the webpage, I am working on but I can still scroll away from the bumpbox when I am using it. I was wondering if there was some sort of jquery method that will keep the webpage from scrolling or just scroll the opposite way with the same distance that the user scrolled. 回答1: It's hard to be specific with no code posted, but to prevent scrolling you could do something like : $(window)​​.on('scroll', function() { $(this).scrollTop(100); //sets the

Page viewer webpart won't take login parameters

吃可爱长大的小学妹 提交于 2019-12-19 10:03:17
问题 I need to show an external site through our sharepoint portal and have added a Page viewer web part. The problem is that the address includes a login and password used to autologin to the external site but Sharepoint only shows the login page on click. If I click the "Test link" in the web part properties it opens as it should but in a different window and not in the sharepoint frame. The adress has the format http://www.site.com/companyname/Login.aspx?style=companyname&lang=en&l=login&p

Page viewer webpart won't take login parameters

戏子无情 提交于 2019-12-19 10:03:13
问题 I need to show an external site through our sharepoint portal and have added a Page viewer web part. The problem is that the address includes a login and password used to autologin to the external site but Sharepoint only shows the login page on click. If I click the "Test link" in the web part properties it opens as it should but in a different window and not in the sharepoint frame. The adress has the format http://www.site.com/companyname/Login.aspx?style=companyname&lang=en&l=login&p

how can I print a web page with all its css style attached to the page?

你离开我真会死。 提交于 2019-12-19 05:08:38
问题 I want to add a print button to enable users to print my web page. However when I print all the css styles are lost. It seems the printer only keeps the basic html elements. If I also want to print out the page exactly as it looks like in a browser, what should I do? I mean if I use a color printer it will print a colorful page with css styles on it. When I use a black and white printer it should print light colors as white and dark colors as grey or black. 回答1: If you have media="screen" on

How to detect if a page has fully rendered using jQuery?

六眼飞鱼酱① 提交于 2019-12-19 02:27:45
问题 When using $(document).ready(functioon(){alert("Loaded.")}); it pops up the alert box that says "Loaded." even before the page has fully loaded (in other words there're loading still going on like images). Any thoughts? 回答1: $(window).on('load', function() { //everything is loaded }); 回答2: Try out .load() instead. $(document).load(function () { alert('Loaded'); } The load event is sent to an element when it and all sub-elements have been completely loaded. http://api.jquery.com/load-event/