Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Net;
- using Bunifu.Framework.UI;
- using SetProxy;
- using System.IO;
- using System.Threading;
- using CefSharp;
- using CefSharp.WinForms;
- namespace UpworkRateQuotesApplication
- {
- public partial class Form1 : Form
- {
- List<string> currentQuotes = new List<string>();
- int i = 0;
- string[] ips = { "54.91.20.17:80", "163.172.136.226:8811", "51.158.68.26:8811", "138.197.161.53:8080", "163.172.152.52:8811" };
- /* "144.217.6.80:8080", "54.39.53.104:3128","23.237.173.102:3128",
- "159.65.253.109:8080",
- "145.239.7.84:3128"};//, ;*/
- public ChromiumWebBrowser chromeBrowser;
- private void InitializeChromium()
- {
- CefSettings settings = new CefSettings();
- Cef.Initialize(settings);
- chromeBrowser = new ChromiumWebBrowser("https://www.quotes.net/authors/Cometan");
- this.Controls.Add(chromeBrowser);
- chromeBrowser.Dock = DockStyle.Fill;
- // Bot((WebBrowser)chromeBrowser, "73146");
- // chromeBrowser.
- // chromeBrowser.
- }
- public Form1()
- {
- InitializeComponent();
- //Get latest IE version
- /*if (!WBEmulator.IsBrowserEmulationSet())
- {
- WBEmulator.SetBrowserEmulationVersion();
- }
- webBrowser1.Url = new Uri("https://www.quotes.net/authors/Cometan");*/
- InitializeChromium();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- // DataScrapping();
- // FillDataGridView();
- }
- private void Bot(ChromiumWebBrowser webBrowser, string quoteId)
- {
- // MessageBox.Show(webBrowser.GetBrowser().MainFrame.ViewSource());
- /*foreach (HtmlElement elem in webBrowser.Document.GetElementsByTagName("span"))
- {
- if (elem.GetAttribute("data-qid") == quoteId)
- {
- HtmlElementCollection elements = elem.Children;
- elements[4].InvokeMember("Click");
- }
- }*/
- }
- int a = 0;
- private void WebBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
- {
- // if (a >= ips.Length) return;
- /*if(webBrowser1.Url != new Uri("https://www.quotes.net/authors/Cometan"))
- {
- webBrowser1.Url = new Uri("https://www.quotes.net/authors/Cometan");
- return;
- }*/
- /* WinInetInterop.SetConnectionProxy(ips[a]);
- System.Threading.Thread.Sleep(100);
- Bot(webBrowser1, "73043");
- MessageBox.Show("Glasano (" + a + ")");*/
- // a++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement