Make a function that produces a regex pattern to identify URLs of interest

Închis Postat la acum 3 ani S-au achitat serviciile după ce au fost prestate
Închis S-au achitat serviciile după ce au fost prestate

Suppose we are intending to scrape a job portal, [login to view URL], which virtually contains many external sublinks, such as:

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

The idea is to apply a difference checker algorithm which yields a generic regex that matches the above routes, considering variable parts of the URLs, based on whether they yielded jobs or not.

Build a function, generatePattern(routes), where routes is an array of object having:

URL: str

hasYieldedJob: bool

In the above example, all the links except the last 3 ones yielded jobs, so, the perfect (fictive pattern) regex would be:

/job/{any number}/{any string}/?{any string}

Case scenarios

Query parameters should be considered as variables due to their complexity.

We do not want to apply a constant rule upon them, even if in the given dataset of urls they are the same. So if we have “/job/foo?parameter=true”, pattern will be “/job/foo{any string}”. Additional brainstorming is welcome.

- If routes contain hyphens, say ".../foo-bar/...", no matter if the part is invariant within the supplied urls, it will be considered as ".../{any string}/..."

Python Regular Expressions

ID Proiect: #29045421

Detalii despre proiect

10 propuneri Proiect la distanță Activ acum 3 ani

10 freelanceri plasează o ofertă medie de 102$ pentru proiect

shadabkhan92

I have experience in python for Regex generator checker for Licene plate checker. Links to some previous projects: https://www.freelancer.com/projects/html/Project-for-Shadab https://www.freelancer.com/projects/pytho Mai multe

$140 USD în 7 zile
(29 recenzii)
6.3
Rajat6905

Dear Client Warm Greetings, I have been Python Developer for 3+ years and have experience of Building Management, Distributed, Database Applications. with Machine Learning, Ensemble Learning, Deep Learning implementat Mai multe

$111 USD în 1 zi
(6 recenzii)
3.6
sajazaeri

Dear employer, Hi I can develop the code to find the URLs which has yielded job. I read the description carefully and got exactly what you want. I am a computer programmer with more than 10 years of working experienc Mai multe

$100 USD în 7 zile
(9 recenzii)
3.8
Sayed95

Hello Sir, I have previous knowledge and experience with regex. I think I can meet your requirements. Inbox me please so I can help. Thanks

$70 USD în 7 zile
(6 recenzii)
3.4
narsim3128

NOTE : I HAVE EXPERTISE IN WEB SCRAPING. With respect to this project I would like to present myself as a candidate for your consideration. I have more than 12 years of IT experience. I have successfully completed pro Mai multe

$140 USD în 4 zile
(1 părere)
2.8
AleksandarDikic

Hello Python EXPERT I have read your description and I am so interested in your project. You can see well experienced and skillful Python +15 years of experience in software development. Confident in your project and I Mai multe

$140 USD în 7 zile
(5 recenzii)
2.5
anashaat95

Hi, I can build this function using python and will give you the script of course. Ready to start right NOW. I could make a sample script for the presented details here if you wanted.

$60 USD în 1 zi
(4 recenzii)
2.0
muzahidscl

Hello, this is Rahaman. I will build you a pyton function to identify if the link has job or not with regex on the given website website. This job seems interesting to me. I have extensive experience in crawling websit Mai multe

$75 USD în 2 zile
(1 părere)
1.4
SaudQadir

Hello, I am Individual freelancer. I have pretty much good experience in regular expression re library of python. I am available for this task. and will try to deliver you the script today. Waiting for your kind respon Mai multe

$100 USD în 2 zile
(1 părere)
0.4
joronoso

Hi, I can get you a working version of the function you need straight away. Probably you will want to supply some additional test data, to see if you need it to account for some additional factors not present in the s Mai multe

$80 USD în 1 zi
(0 recenzii)
0.0