Skip to content

Instantly share code, notes, and snippets.

View amarynets's full-sized avatar

Andrii Marynets amarynets

  • Ukraine
View GitHub Profile
amarynets /
Created July 11, 2018 08:37
aiohttp does a 10 redirection
import asyncio
import aiohttp
url1 = ''
url2 = ''
async def request(url):
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
# -*- coding: utf-8 -*-
import scrapy
class LfrSpider(scrapy.Spider):
name = "lfr"
allowed_domains = [""]
start_urls = ['']
def parse(self, response):
a = [12,545,2,67,12,89,234,76,1,0,90]
def partition(arr, l, r):
x = arr[r]
i = l
for j in range(l, r):
if arr[j] <= x:
arr[i], arr[j] = arr[j], arr[i]
i += 1
# -*- coding: utf-8 -*-
from urllib.parse import urlparse
from urllib.request import urlopen
from urllib.request import build_opener, Request, HTTPCookieProcessor
from http.cookiejar import CookieJar
import traceback
import time
import socket
from pyvirtualdisplay import Display
import scrapy
TypeError at /admin/ads/ads/6/change/
__str__ returned non-string (type URL)
Request Method: GET
Request URL:
Django Version: 1.10.4
Exception Type: TypeError
Exception Value:
__str__ returned non-string (type URL)
Exception Location: /home/marni/work/agora/ENV/lib/python3.5/site-packages/django/utils/ in force_text, line 76
Python Executable: /home/marni/work/agora/ENV/bin/python
# -*- coding: utf-8 -*-
from urllib.parse import urljoin
import scrapy
from selenium import webdriver
from scraper.items import AdsItem
from ads.models import URL
submitHandler: function submitHandler(form, event) {
var values = {
toggler: $('#toggly').val(),
step1Unchecked: {
step1FirstRoofDeg: document.getElementById('range_1').noUiSlider.get(),
step1FirstRoofOrientation: $('#orientation-1').val(),
step1SecondRoofDeg: document.getElementById('range_2').noUiSlider.get(),
step1SecondRoofOrientation: $('#orientation-2').val(),
step1ResultCalculatorSquereMeters: $('#result_calculator').val()