This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.parse | |
import urllib.request | |
import json | |
input_data = { | |
'format': | |
[ | |
{ | |
'item_name': 'name', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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': ''}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elasticsearch_dsl import Search, Q, query as dslq | |
from app import es | |
targetings = [ | |
{ | |
"field": "country", | |
"operator": "NOT IN", | |
"value": "BD" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="panel-form post-contacts"> | |
<button type="button" ng-click="showAnyModal('confirm_modal')" class="close cros-button"><span aria-hidden="true">×</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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |