Skip to content

Instantly share code, notes, and snippets.

Avatar
👑
I am bad at git.

Christopher Crawford MCMXCIII

👑
I am bad at git.
View GitHub Profile
View articlescrapperv2
# This version is just a clean up of the script. I used it while developing, uses functions and
# and has an Error Handling system. Thought you might find it use full.
import string
from typing import ContextManager
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
import csv
import time
@MCMXCIII
MCMXCIII / Latest-Build.py
Last active Feb 7, 2021
Scraping script
View Latest-Build.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
import csv
import time
import os
import re
no_last_weeks = str(input("Number of last weeks: ")).strip()
file_name = str(input("Name of the output file to be saved: ")).strip()
@MCMXCIII
MCMXCIII / 1.py
Created Jan 4, 2021
Code block Regex
View 1.py
py import csv
import re
address_filter=[] #an empty list to store the second column
with open('122023jan.csv', 'r', encoding="utf8") as rf:
reader = csv.reader(rf, delimiter=',')
View test.py
# Generated by Selenium IDE
import pytest
import time
import json
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.keys import Keys
View gist:b837c0d838fffd246dea235b7cb385fb
func main() {
reader := rand.Reader
bitSize := 2048
key, err := rsa.GenerateKey(reader, bitSize)
checkError(err)
publicKey := key.PublicKey
saveGobKey("private.key", key)
View searchbar.html
<div class="wrap">
<div class="search">
<input type="text" class="searchTerm" placeholder="some example here?">
<button type="submit" class="searchButton">
<i class="fa fa-search"></i>
</button>
</div>
<div class="search">
<input type="text" class="searchTerm" placeholder="Some example term here?">
<button type="submit" class="searchButton">
View css-search.css
@import url(https://fonts.googleapis.com/css?family=Open+Sans);
body{
background: #f2f2f2;
font-family: 'Open Sans', sans-serif;
}
.search {
width: 100%;
position: relative;
View Docs-Windows.md

How to use

Install (Windows)

  • Install chocolately and install nodejs/NPM

if you are using Windows you need to become admin and from there you need to install nodejs

you can use chocolately to instrall nodejs and all of the other packages on the machine you are using.

View activitymain.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.test.MainActivity">
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="in.couponsanddeals.bina">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"