-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.py
73 lines (66 loc) · 2.68 KB
/
script.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# === IMPORT MODULES === #
import requests
from datetime import date
from bs4 import BeautifulSoup
today = date.today()
# === MAIN PARAMETERS (PC - WINDOWS) === #
html = requests.get("https://www.igdb.com/games/coming_soon?pfilter=6")
soup = BeautifulSoup(html.text, "html.parser")
rows = soup.findAll("div", {"class": "media-body"})
file = open("/var/www/html/game/pc.txt", "w")
for row in rows:
if str(today.day) in row.text:
row = row.find("a").text
file = open("/var/www/html/game/pc.txt", "a")
file.write(f"{row}\n")
print(f"{row}")
html = requests.get("https://www.igdb.com/games/coming_soon?pfilter=169")
soup = BeautifulSoup(html.text, "html.parser")
rows = soup.findAll("div", {"class": "media-body"})
file = open("/var/www/html/game/xbox.txt", "w")
for row in rows:
if str(today.day) in row.text:
row = row.find("a").text
file = open("/var/www/html/game/xbox.txt", "a")
file.write(f"{row}\n")
print(f"{row}")
html = requests.get("https://www.igdb.com/games/coming_soon?pfilter=130")
soup = BeautifulSoup(html.text, "html.parser")
rows = soup.findAll("div", {"class": "media-body"})
file = open("/var/www/html/game/switch.txt", "w")
for row in rows:
if str(today.day) in row.text:
row = row.find("a").text
file = open("/var/www/html/game/switch.txt", "a")
file.write(f"{row}\n")
print(f"{row}")
html = requests.get("https://www.igdb.com/games/coming_soon?pfilter=48")
soup = BeautifulSoup(html.text, "html.parser")
rows = soup.findAll("div", {"class": "media-body"})
file = open("/var/www/html/game/ps4.txt", "w")
for row in rows:
if str(today.day) in row.text:
row = row.find("a").text
file = open("/var/www/html/game/ps4.txt", "a")
file.write(f"{row}\n")
print(f"{row}")
html = requests.get("https://www.igdb.com/games/coming_soon?pfilter=34")
soup = BeautifulSoup(html.text, "html.parser")
rows = soup.findAll("div", {"class": "media-body"})
file = open("/var/www/html/game/android.txt", "w")
for row in rows:
if str(today.day) in row.text:
row = row.find("a").text
file = open("/var/www/html/game/android.txt", "a")
file.write(f"{row}\n")
print(f"{row}")
html = requests.get("https://www.igdb.com/games/coming_soon?pfilter=39")
soup = BeautifulSoup(html.text, "html.parser")
rows = soup.findAll("div", {"class": "media-body"})
file = open("/var/www/html/game/ios.txt", "w")
for row in rows:
if str(today.day) in row.text:
row = row.find("a").text
file = open("/var/www/html/game/ios.txt", "a")
file.write(f"{row}\n")
print(f"{row}")