Skip to content

Commit 7b0eb22

Browse files
committed
Storing website dataBase, Start getting results from website with a basic structure of regex data
1 parent ae2f7c6 commit 7b0eb22

File tree

3 files changed

+65
-59
lines changed

3 files changed

+65
-59
lines changed

api/app.py

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,58 @@
44
#
55
# Ressources / WebSites used to fetch data:
66
# See WEBSITE_DATABASE
7-
7+
# on pending:
8+
# https://angel.co/europe/python/jobs~a
9+
# https://remoteml.com/tags/Python/~a
10+
# https://nodesk.co/remote-jobs/python/~a
11+
# https://www.codementor.io/freelance-jobs/python~a
12+
# https://www.indeed.com.ph/Remote-Python-jobs~a
13+
# https://remote4me.com/remote-python-jobs~a
14+
# https://www.irishjobs.ie/Remote-Python-Jobs~a
15+
# https://www.reed.co.uk/jobs/python-developer-remote/36144618~a
16+
# https://www.simplyhired.com/search?q=remote+python+developer&l=austin%2C+tx&job=ViO7geREaxO513t_xvNXtyVy2t9_kmX9_BjPGMevSnLgkOwH73PMww~a
17+
# https://remotees.com/remote-python-jobs~a
18+
# https://www.indeed.co.uk/Python-jobs-in-Remote~a
19+
# https://jobs.trovit.co.uk/remote-python-jobs~a
20+
# https://www.glassdoor.co.uk/Job/uk-remote-python-jobs-SRCH_IL.0,2_IN2_KO3,16.htm~a
21+
# https://www.cybercoders.com/jobs/remote-python-developer-jobs/~a
22+
# https://www.pearsonfrank.com/32655/uk-remote-python-developer~a
23+
# https://www.flexjobs.com/jobs/python~a
24+
# https://twitter.com/remotepython?lang=en~a
25+
# https://www.reddit.com/r/remotepython/~a
26+
# https://www.remotelyawesomejobs.com/remote-python-jobs/~a
27+
# https://europeremotely.com/remote-jobs/Python~a
28+
# https://www.glassdoor.com/Job/remote-python-jobs-SRCH_IL.0,6_IS11047_KO7,13.htm~a
29+
# https://www.glassdoor.com/Job/remote-python-jobs-SRCH_KO0,13.htm~a
30+
# https://www.linkedin.com/jobs/python-remote-jobs~a
31+
# https://stackoverflow.com/jobs/remote-developer-jobs-using-python~a
32+
# https://weworkremotely.com/remote-jobs/search?utf8=%E2%9C%93&term=python~a
33+
# https://www.workingnomads.co/remote-python-jobs~a
34+
# https://www.python.org/jobs/location/telecommute/~a
35+
# https://jobs.github.com/positions?description=python~a
36+
# https://pythonjobs.github.io/~a
37+
# https://www.python.org/jobs/~a
38+
# https://www.indeed.com/q-Remote-Python-Developer-jobs.html~a
39+
# https://www.indeed.com/q-Remote-Python-jobs.html~a
40+
# https://www.indeed.com/q-Python-jobs.html~a
41+
# https://www.indeed.com/q-Python-Developer-jobs.html~a
42+
# https://remoteok.io/remote-python-jobs~a
43+
# https://www.linkedin.com/jobs/python-jobs~a
44+
# https://www.linkedin.com/jobs/python-developer-jobs~a
45+
# https://www.remotepython.com/~a
46+
# https://www.pythonjobs.com/~a
47+
# https://www.glassdoor.com/Job/python-developer-jobs-SRCH_KO0,16.htm~a
48+
# https://www.naukri.com/python-developer-jobs~a
49+
# https://www.upwork.com/o/jobs/browse/skill/python/~a
50+
# https://www.seek.co.nz/python-jobs~a
51+
# https://www.nijobs.com/Python-Jobs-in-Belfast~a
52+
# https://www.irishjobs.ie/Python-Developer-Jobs-in-Dublin~a
53+
# https://stackoverflow.com/jobs/developer-jobs-using-python~a
54+
# https://www.technojobs.co.uk/python-jobs~a
55+
# https://www.pythonjobshq.com/~a
56+
import os
857
import requests
9-
import BeautifulSoup
58+
from bs4 import BeautifulSoup
1059
import schedule
1160
import time
1261

@@ -24,23 +73,29 @@ def Presentation():
2473
# -the example of schema to fetch and
2574
# -the total of result to be get
2675
def fetch_fromIT(url, schema, total):
27-
soup = BeautifulSoup('\n'.join(requests.get(url).text.splitlines()[1:total]), 'html.parser')
28-
return [i.get('href') for i in soup.find_all(schema)]
76+
data = requests.get(url).text
77+
soup = BeautifulSoup(data, 'html.parser')
78+
result = ""
79+
for link in soup.find_all(schema.split(',')[0]):
80+
result += link.get(schema.split(',')[1])
81+
print(link.get(schema.split(',')[1]))
82+
return result
2983

3084
def getWebSite_and_schema_and_save_data():
31-
result = ""
85+
result = []
3286
# Getting list of links and schemas
3387
# and remove whitespace characters like `\n` at the end of each line
3488
lines = [line.rstrip('\n') for line in open(WEBSITE_DATABASE)]
3589
# Loop in lines, fetch and get result
3690
for x in lines:
37-
result += fetch_fromIT(x.plit('~')[0], x.plit('~')[1], 15)
91+
print "Fetching on "+x.split('~')[0]
92+
result += fetch_fromIT(x.split('~')[0], x.split('~')[1], 15)
3893
return result;
3994

4095
# The method JOB
4196
def PYTOME_job():
4297
print "Starting the Job............."
43-
getWebSite_and_schema_and_save_data()
98+
print getWebSite_and_schema_and_save_data()
4499

45100
# Other Schedules Options
46101
# schedule.every(5).to(10).minutes.do(job)
@@ -51,7 +106,6 @@ def PYTOME_job():
51106
# Let say, automation every day at 00:01
52107
#schedule.every().day.at("00:01").do(PYTOME_job)
53108

54-
55109
Presentation()
56110
PYTOME_job()
57111
# while True:

api/data/website.ptm

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,2 @@
1-
https://github.com/pyjobs/annonces~a
2-
https://djangogigs.com/gigs/remote/~a
3-
https://angel.co/europe/python/jobs~a
4-
https://remoteml.com/tags/Python/~a
5-
https://nodesk.co/remote-jobs/python/~a
6-
https://www.codementor.io/freelance-jobs/python~a
7-
https://www.indeed.com.ph/Remote-Python-jobs~a
8-
https://remote4me.com/remote-python-jobs~a
9-
https://www.irishjobs.ie/Remote-Python-Jobs~a
10-
https://www.reed.co.uk/jobs/python-developer-remote/36144618~a
11-
https://www.simplyhired.com/search?q=remote+python+developer&l=austin%2C+tx&job=ViO7geREaxO513t_xvNXtyVy2t9_kmX9_BjPGMevSnLgkOwH73PMww~a
12-
https://remotees.com/remote-python-jobs~a
13-
https://www.indeed.co.uk/Python-jobs-in-Remote~a
14-
https://jobs.trovit.co.uk/remote-python-jobs~a
15-
https://www.glassdoor.co.uk/Job/uk-remote-python-jobs-SRCH_IL.0,2_IN2_KO3,16.htm~a
16-
https://www.cybercoders.com/jobs/remote-python-developer-jobs/~a
17-
https://www.pearsonfrank.com/32655/uk-remote-python-developer~a
18-
https://www.flexjobs.com/jobs/python~a
19-
https://twitter.com/remotepython?lang=en~a
20-
https://www.reddit.com/r/remotepython/~a
21-
https://www.remotelyawesomejobs.com/remote-python-jobs/~a
22-
https://europeremotely.com/remote-jobs/Python~a
23-
https://www.glassdoor.com/Job/remote-python-jobs-SRCH_IL.0,6_IS11047_KO7,13.htm~a
24-
https://www.glassdoor.com/Job/remote-python-jobs-SRCH_KO0,13.htm~a
25-
https://www.linkedin.com/jobs/python-remote-jobs~a
26-
https://stackoverflow.com/jobs/remote-developer-jobs-using-python~a
27-
https://weworkremotely.com/remote-jobs/search?utf8=%E2%9C%93&term=python~a
28-
https://www.workingnomads.co/remote-python-jobs~a
29-
https://www.python.org/jobs/location/telecommute/~a
30-
https://jobs.github.com/positions?description=python~a
31-
https://pythonjobs.github.io/~a
32-
https://www.python.org/jobs/~a
33-
https://www.indeed.com/q-Remote-Python-Developer-jobs.html~a
34-
https://www.indeed.com/q-Remote-Python-jobs.html~a
35-
https://www.indeed.com/q-Python-jobs.html~a
36-
https://www.indeed.com/q-Python-Developer-jobs.html~a
37-
https://remoteok.io/remote-python-jobs~a
38-
https://www.linkedin.com/jobs/python-jobs~a
39-
https://www.linkedin.com/jobs/python-developer-jobs~a
40-
https://www.remotepython.com/~a
41-
https://www.pythonjobs.com/~a
42-
https://www.glassdoor.com/Job/python-developer-jobs-SRCH_KO0,16.htm~a
43-
https://www.naukri.com/python-developer-jobs~a
44-
https://www.upwork.com/o/jobs/browse/skill/python/~a
45-
https://www.seek.co.nz/python-jobs~a
46-
https://www.nijobs.com/Python-Jobs-in-Belfast~a
47-
https://www.irishjobs.ie/Python-Developer-Jobs-in-Dublin~a
48-
https://stackoverflow.com/jobs/developer-jobs-using-python~a
49-
https://www.technojobs.co.uk/python-jobs~a
50-
https://www.pythonjobshq.com/~a
1+
https://github.com/pyjobs/annonces~a,href
2+
https://djangogigs.com/gigs/remote/~a,href

api/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
requests==2.13.0
2-
BeautifulSoup
2+
BeautifulSoup4
33
schedule

0 commit comments

Comments
 (0)