gecko

Web crawler capable of interpreting Javascript in python for Windows

戏子无情 提交于 2019-12-20 10:55:46
问题 My ultimate goal is to build a web crawler capable of downloading all of the images on a webpage. My understanding from the reading I've done is that I need to embed a rendering/layout engine such as Gecko or Webkit. Unfortunately, I'm running windows, so PyWebkit is out and short learning C++ for Gecko or Java to use Rhino, I'm not sure where to turn. Is there a reliable rendering engine with python bindings that will work in windows (64-bit, Windows 7)? Is there an easy way to execute

获取所选元素的外部HTML

寵の児 提交于 2019-12-19 21:54:08
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我正在尝试使用jQuery获取选定对象的HTML。 我知道 .html() 函数; 问题是我需要包含所选对象的HTML(在这种情况下为表格行,其中 .html() 仅返回行内的单元格)。 我四处搜寻,发现了一些克隆对象,将其添加到新创建的div等中的非常“ hackish”类型的方法,等等,但这似乎很脏。 有没有更好的方法,还是新版本的jQuery(1.4.2)提供了任何一种 outerHtml 功能? #1楼 $("#myNode").parent(x).html(); 其中“ x”是节点号,第一个从0开始,如果您要获取特定的节点号,则应该得到所需的正确节点。 如果您有子节点,那么您实际上应该在想要的节点上放置一个ID,而在该节点上仅输入零。 使用这种方法,没有“ x”适合我。 #2楼 我认为目前(2012年5月1日),所有主流浏览器都支持externalHTML函数。 在我看来,此片段就足够了。 我个人会选择记住: // Gives you the DOM element without the outside wrapper you want $('.classSelector').html() // Gives you the outside wrapper as well only for the

What and where exactly are privileged code, chrome code, Gecko?

浪尽此生 提交于 2019-12-18 09:38:59
问题 In reading about the File API and wanting to write data directly from an indexedDB database to the client disk instead of first building and holding a large blob in RAM to download to disk, there are a few basic items I'm not understanding. In the MDN documents these two statements are found: In Gecko, privileged code can create File objects representing any local file without user interaction. If you want to use the DOM File API in chrome code, you can do so without restriction. In fact, you

-webkit- and -moz-border-radius does not work on tables? [duplicate]

天大地大妈咪最大 提交于 2019-12-18 03:08:08
问题 This question already has answers here : CSS3's border-radius property and border-collapse:collapse don't mix. How can I use border-radius to create a collapsed table with rounded corners? (22 answers) Closed 6 years ago . This works div { -moz-border-radius: 5px 5px 0 0; border:1px solid #000; margin:30px; } This does not work table { -moz-border-radius: 5px 5px 0 0; border:1px solid #000; margin:30px; } Does anyone know how to use -moz and -webkit to work on tables? 回答1: 5.6. Effect on

Downloadable font on firefox: bad URI or cross-site access not allowed

穿精又带淫゛_ 提交于 2019-12-17 08:25:13
问题 I'm a webmaster at http://www.beperk.com (I'm giving you the URL so you are able to check the problem) and I'm having lots of problems using @font-face in CSS. I want to use the foundicons from zurb dot com so I hosted them at Amazon S3. I set up the bucket to allow crossdomain access as specified here: http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors And everything started to work seamless at webkit, trident and gecko... mostly: when browsing the web with firefox

神箭手js爬取房天下

陌路散爱 提交于 2019-12-16 13:09:21
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> /* 神箭手云_爬虫开发 支持原生JavaScript 开发教程:http://docs.shenjian.io/develop/crawler/doc/concept/crawler.html */ var configs = { domains: ["fang.com"], scanUrls: [], contentUrlRegexes: [/https:\/\/.*/], //内容页url正则 helperUrlRegexes: [/https:\/\/.*/], //列表页url正则 可留空 autoFindUrls: false, enableJS: true, fields: [ { // 楼盘名字 name: "name", selector: "//span[@class='biaoti']" //默认使用XPath }, { // 所属区域 name: "area", selector: "//dl[@class='xiangqing']/dd[1]" //默认使用XPath }, { // 楼盘地址 name: "address", selector: "//dl[@class='xiangqing']/dd[2]/span" //默认使用XPath }, { // 物业类型 name:

How to display HTML page using BrightScript

回眸只為那壹抹淺笑 提交于 2019-12-14 02:38:05
问题 I would like to display a single HTML web page on a Roku channel. I have no need to follow hyperlinks, but the page does have periodic updates. Is it possible to write a BrightScript application that uses Gecko to render the page, or would I have to draw the page myself? I see plenty of information as well as examples in the Roku SDK that describe how to provide user navigation and play video on a Roku box using BrightScript, but I can't find any information about displaying a single HTML

how to handle downloads on gecko15 with mozilla xul15 in visual basic?

泪湿孤枕 提交于 2019-12-13 04:45:41
问题 I am using gecko15 with mozilla xul15 as a web browser on my visual basic application anyone knows how i can handle downloads please ? because, when i click on a file to download from that browser nothing happens. thanks a lot for any help. 回答1: Also: @Form LOad Event: Add: AddHandler Gecko.LauncherDialog.Download, AddressOf LauncherDialog_Download Then Private Sub LauncherDialog_Download(ByVal sender As Object, ByVal e As Gecko.LauncherDialogEvent) e.cancel() try catch ex as exception

How to call Firefox printpreview via url (not getMostRecentBrowserWindow) using addon SDK

 ̄綄美尐妖づ 提交于 2019-12-12 17:41:10
问题 One way I can call printpreview is with getMostRecentBrowserWindow const { getMostRecentBrowserWindow } = require('sdk/window/utils'); var chromewin = getMostRecentBrowserWindow(); chromewin.PrintUtils.printPreview(chromewin.PrintPreviewListener); Now i want to call printpreview with url. Please help me. Thank you so much. 来源: https://stackoverflow.com/questions/22728166/how-to-call-firefox-printpreview-via-url-not-getmostrecentbrowserwindow-using

Prevent Firefox Web Notifications from automatically Closing

若如初见. 提交于 2019-12-12 13:22:03
问题 I've got Web Notifications working in Firefox in combination with Server Sent DOM events. Unfortunately the notifications disappear after about two to three seconds. I prefer Chrome's method of leaving the message visible (with a maximum of three displayed at any given time) until the user clicks the notification. Here is what I have... window.onload = function(e) { if ('EventSource' in window) {//Server Sent DOM Events var sse = new EventSource('../mail/sse/'); if (Notification.permission &&