Skip to content

Instantly share code, notes, and snippets.

View ijharulislam's full-sized avatar

ijhar ijharulislam

  • Full-stack Web Developer
  • Dhaka, Bangladesh.
View GitHub Profile
import urllib.parse
import urllib.request
import json
input_data = {
'format':
[
{
'item_name': 'name',
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import QCoreApplication
from PyQt5 import QtCore
from PyQt5.QtGui import QIcon
import os
from PyQt5 import QtWidgets
from datetime import datetime
from lxml import html
from selenium.webdriver.common.proxy import *
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
proxy = {
'address': '191.101.24.45:8085',
'username':'user3668508',
import selenium
from selenium.webdriver.common.proxy import *
from selenium import webdriver
PROXY = "5.101.218.179:8085"
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)
driver = webdriver.Chrome(chrome_options=chrome_options)
import urllib.parse
import urllib.request
import json
input_data = {
'format': [
{'item_name': 'name', 'xpath': '//*[@id="storeMap"]/header[3]/div/h2/text()', 'regex_match': 'Null', 'regex_item': 'Null', 'remove_tag': ''},
{'item_name': 'zip', 'xpath': '//*[@id="storeMap"]/section/div/div[1]/dl/dd[1]', 'regex_match': '〒([\\d\\-]+)', 'regex_item': '$1 ', 'remove_tag': ''},
# {'item_name': 'address', 'xpath': '//*[@id="storeMap"]/section/div/div[1]/dl/dd[1]', 'regex_match': '〒[\\d\\-]+<br>([^<]+)', 'regex_item': '$1 ', 'remove_tag': ''},
import os
file = os.path.expanduser('~')+"/.bashrc"
environs = [
"DB_NAME=db",
"DB_USER=db_user",
"DB_PASSWORD=password",
"SECRET_KEY='your secret kye here'",
"DEBUG=False",
from elasticsearch_dsl import Search, Q, query as dslq
from app import es
targetings = [
{
"field": "country",
"operator": "NOT IN",
"value": "BD"
},
with open('TestReport.csv', 'w') as f:
dict_writer = csv.DictWriter(f, data[0].keys())
dict_writer.writeheader()
dict_writer.writerows(data)
with open('%s'%file_name, 'r') as f:
reader = csv.DictReader(f)
for row in reader:
raw_data = {
'shops_root_url': row['Shops_root_url'],
<div class="panel-form post-contacts">
<button type="button" ng-click="showAnyModal('confirm_modal')" class="close cros-button"><span aria-hidden="true">&times;</span></button>
<form name="postContactForm" id="form-contact" novalidate>
<h3>Basic Info</h3>
<div class="row">
<div class="col-xs-6">
<div class="info-elements">
<label>
<span>First Name </span>
<span style=" color: #ff9100">*</span>
# import urllib
# import urllib2
from datetime import datetime
import xlrd
from lxml import html
from bs4 import BeautifulSoup
import xlsxwriter
import re
from selenium import webdriver