-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefault.aspx
More file actions
executable file
·35 lines (33 loc) · 1.62 KB
/
Copy pathDefault.aspx
File metadata and controls
executable file
·35 lines (33 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>A Simple HTML Scraper using IE and PhantomJS</title>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.DoTheScrape').click(function () {
$('.ScrapedHtml').val(""); //clear the text area
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div class="main-content">
<h1>A really simple HTML Scraper written using Csharp and using PhantomJSDriver</h1>
<label for="txtUrlToScrape">Enter a URL to scrape - not one that requires logging in.</label>
<asp:TextBox Width="100%" ID="txtUrlToScrape" runat="server"/>
<asp:RadioButtonList runat="server" ID="radlstBrowserToUse">
<asp:ListItem Value="PhantomJSDriver" Text="Use PhantomJS Headless browser"></asp:ListItem>
<asp:ListItem Value="InternetExplorerDriver" Text="Use Internet Explorer browser"></asp:ListItem>
</asp:RadioButtonList>
<asp:Button runat="server" ID="btnDoTheScrape" Text="Do the scrape" class="DoTheScrape"/>
<label for="txtScrapedHtml">The scraped HTML will appear in the Textbox below.</label>
<asp:TextBox TextMode="MultiLine" ReadOnly="true" runat="server" CssClass="ScrapedHtml" ID="txtScrapedHtml" Width="100%" Height="800px"></asp:TextBox>
</div>
</div>
</form>
</body>
</html>