Skip to content

Instantly share code, notes, and snippets.

View saasindustries's full-sized avatar

SaaS Industries saasindustries

View GitHub Profile
import requests
import csv
APIKEY = 'YOUR API KEY HERE'
NUM = 5
def check_urls(urls):
headers = {
'apikey': APIKEY
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# initialize webdriver
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
from selenium import webdriver
# other imports here
PROXY = "127.63.13.19:3184" #HOST:PORT or IP:PORT
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)
chrome = webdriver.Chrome(options=chrome_options)
chrome.get("https://www.reddit.com/")
# more code here
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
# other imports here
options = Options()
options.headless = True
driver = webdriver.Chrome(CHROMEDRIVER_PATH, chrome_options=options)
driver.get("https://www.reddit.com/")
for post in posts:
header = post.find_element_by_tag_name("span")
print(header.text)
ArrayList<String> hyperLinks = new ArrayList<String>();
// iterating and extracting
for (Element e:pageElements) {
hyperLinks.add("Text: " + e.text());
hyperLinks.add("Link: " + e.attr("href"));
}
for (String s : hyperLinks) {
System.out.println(s);
import java.io.IOException;
import java.util.ArrayList;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
public class myscrapy {
import java.io.IOException;
import java.net.MalformedURLException;
import com.gargoylesoftware.htmlunit.BrowserVersion;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.DomNode;
import com.gargoylesoftware.htmlunit.html.DomNodeList;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
axios.get('https://www.forextradingbig.com/instaforex-broker-review/').then(response => {
const html = response.data;
})
const axios = require('axios');
const cheerio = require('cheerio');
//performing a GET request
axios.get('https://www.forextradingbig.com/instaforex-broker-review/')
.then(response => {
//handling the success
const html = response.data;