Skip to content

Instantly share code, notes, and snippets.

Avatar

Pourya MandiSanam pourya2374

  • Tehran - Iran
View GitHub Profile
View blog_music_crawler.py
from bs4 import BeautifulSoup
source = str(open('page_source.html', 'r').readlines())
soup = BeautifulSoup(source, 'html.parser')
output = open('links.txt', 'w')
for a_tag in soup.find_all('a', string="DOWNLOAD"):
output.write(a_tag['href'] + '\n')
output.close()
View command-line email
echo "This is an email body." | mutt -s "This is an email subject" poury.ms@gmail.com
View git_log
git log --graph --abbrev-commit --decorate --date=relative --all
View zainpal_gateway.py
from zeep import Client
class Zarinpal:
MERCHANT_ID = '{YOUR MERCHANT_ID}'
ZARINPAL_WEBSERVICE = 'https://www.zarinpal.com/pg/services/WebGate/wsdl'
ERRORS = {
-1: 'نقص اطلاعات',
-2: 'آی.پی یا merchant پذیرنده صحیح نیست',
-3: 'امکان پرداخت با رقم درخواستی میسر نیست',
View sadad_gateway.py
import base64
import json
import pytz
from datetime import datetime
import pyDes as pyDes
import requests
class Sadad:
You can’t perform that action at this time.