This file contains 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 flask import Flask, request | |
import requests | |
from bs4 import BeautifulSoup as bs | |
app = Flask(__name__) | |
@app.route('/live/', methods=['GET']) | |
def html(): | |
url = 'https://football.kulichki.net/live.htm' |
This file contains 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 bs4 import BeautifulSoup | |
import requests | |
import csv | |
from datetime import datetime | |
from multiprocessing import Pool | |
#https://gist.github.com/kirussian911/b87287fda5a112a8a35e38cfd8d55c2a | |
def get_html(url): | |
r = requests.get(url) |
This file contains 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 bs4 import BeautifulSoup | |
import csv | |
import urllib.request | |
url = 'https://aliholic.com/shop/' | |
def get_html(url): | |
response = urllib.request.urlopen(url) | |
return response.read() |
This file contains 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 | |
import re | |
import urllib.request | |
import requests | |
def load_source(website): | |
site = urllib.request.urlopen(website) | |
read_site = site.read() | |
return read_site |
This file contains 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.request | |
import re | |
page_number = 1 | |
def load_source(website): | |
site = urllib.request.urlopen(website) | |
read_site = site.read() | |
return read_site | |
This file contains 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.request | |
def load_source(website): | |
site = urllib.request.urlopen(website) # получаем код сайта | |
read_site = site.read() # читаем его | |
return read_site # возвращаем результат | |
def parse_img(source): | |
links = [] |
This file contains 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 requests | |
from bs4 import BeautifulSoup as BS | |
def get_html(url): | |
r = requests.get(url) | |
return r.text | |
This file contains 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 requests | |
from bs4 import BeautifulSoup as BS | |
def get_html(url): | |
r = requests.get(url) | |
return r.text | |
This file contains 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.request # библиотека для работы с сетью | |
from bs4 import BeautifulSoup # библиотека для парсинга html | |
import csv | |
''' | |
1. Товары с пустой ценой | |
2. Лишние строки | |
3. Лишние символы [ ] ' | |
4. В идеале и разместить сразу в разных столбцах | |
5. Парсинг картинок через import shutil |