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
# Website was dynamically updated so requests-html was used instead of bs4 | |
from requests_html import HTMLSession | |
import csv | |
session = HTMLSession() | |
with open('csgo_match_stats.csv', mode='w', newline='', encoding='utf8') as csv_file: | |
# fieldnames needs to be the same as while doing .appned() | |
fieldnames = ['Left Team', 'Left Team Score', 'Right Team Score', 'Right Team', 'Event Name'] | |
writer = csv.DictWriter(csv_file, fieldnames=fieldnames) |
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 serpapi import GoogleSearch | |
import csv | |
params = { | |
"api_key": "YOUR_API_KEY", | |
"engine": "google_maps", | |
"type": "search", | |
"google_domain": "google.com", | |
"q": "кофе мариуполь", # query | |
"ll": "@47.0919234,37.5093148,12z" # @ + latitude + , + longitude + , + zoom |
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, lxml, json | |
headers = { | |
"User-Agent": | |
"Mozilla/5.0 (Linux; Android 10; HD1913) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36 EdgA/46.1.2.5140" | |
} | |
def get_organic_results(): |