mirror of https://github.com/Bunsly/JobSpy
Compare commits
No commits in common. "04032a0f91609405a0529927840d54f096f1544c" and "d52e366ef7dc19501249a82c4878e6556d615e61" have entirely different histories.
04032a0f91
...
d52e366ef7
|
@ -1,50 +1,33 @@
|
||||||
name: Publish Python 🐍 distributions 📦 to PyPI
|
name: Publish Python 🐍 distributions 📦 to PyPI
|
||||||
on:
|
on: push
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-n-publish:
|
build-n-publish:
|
||||||
name: Build and publish Python 🐍 distributions 📦 to PyPI
|
name: Build and publish Python 🐍 distributions 📦 to PyPI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install toml
|
|
||||||
|
|
||||||
- name: Increment version
|
|
||||||
run: python increment_version.py
|
|
||||||
|
|
||||||
- name: Commit version increment
|
|
||||||
run: |
|
|
||||||
git config --global user.name 'github-actions'
|
|
||||||
git config --global user.email 'github-actions@github.com'
|
|
||||||
git add pyproject.toml
|
|
||||||
git commit -m 'Increment version'
|
|
||||||
|
|
||||||
- name: Push changes
|
|
||||||
run: git push
|
|
||||||
|
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pip install poetry --user
|
run: >-
|
||||||
|
python3 -m
|
||||||
|
pip install
|
||||||
|
poetry
|
||||||
|
--user
|
||||||
|
|
||||||
- name: Build distribution 📦
|
- name: Build distribution 📦
|
||||||
run: poetry build
|
run: >-
|
||||||
|
python3 -m
|
||||||
|
poetry
|
||||||
|
build
|
||||||
|
|
||||||
- name: Publish distribution 📦 to PyPI
|
- name: Publish distribution 📦 to PyPI
|
||||||
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@ -1,21 +0,0 @@
|
||||||
import toml
|
|
||||||
|
|
||||||
def increment_version(version):
|
|
||||||
major, minor, patch = map(int, version.split('.'))
|
|
||||||
patch += 1
|
|
||||||
return f"{major}.{minor}.{patch}"
|
|
||||||
|
|
||||||
# Load pyproject.toml
|
|
||||||
with open('pyproject.toml', 'r') as file:
|
|
||||||
pyproject = toml.load(file)
|
|
||||||
|
|
||||||
# Increment the version
|
|
||||||
current_version = pyproject['tool']['poetry']['version']
|
|
||||||
new_version = increment_version(current_version)
|
|
||||||
pyproject['tool']['poetry']['version'] = new_version
|
|
||||||
|
|
||||||
# Save the updated pyproject.toml
|
|
||||||
with open('pyproject.toml', 'w') as file:
|
|
||||||
toml.dump(pyproject, file)
|
|
||||||
|
|
||||||
print(f"Version updated from {current_version} to {new_version}")
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[virtualenvs]
|
||||||
|
in-project = true
|
|
@ -1,21 +1,15 @@
|
||||||
[build-system]
|
|
||||||
requires = [ "poetry-core",]
|
|
||||||
build-backend = "poetry.core.masonry.api"
|
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "python-jobspy"
|
name = "python-jobspy"
|
||||||
version = "1.1.76"
|
version = "1.1.75"
|
||||||
description = "Job scraper for LinkedIn, Indeed, Glassdoor & ZipRecruiter"
|
description = "Job scraper for LinkedIn, Indeed, Glassdoor & ZipRecruiter"
|
||||||
authors = [ "Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>",]
|
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
|
||||||
homepage = "https://github.com/Bunsly/JobSpy"
|
homepage = "https://github.com/Bunsly/JobSpy"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = [ "jobs-scraper", "linkedin", "indeed", "glassdoor", "ziprecruiter",]
|
keywords = ['jobs-scraper', 'linkedin', 'indeed', 'glassdoor', 'ziprecruiter']
|
||||||
[[tool.poetry.packages]]
|
|
||||||
include = "jobspy"
|
|
||||||
from = "src"
|
|
||||||
|
|
||||||
[tool.black]
|
packages = [
|
||||||
line-length = 88
|
{ include = "jobspy", from = "src" }
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.10"
|
python = "^3.10"
|
||||||
|
@ -28,8 +22,16 @@ tls-client = "^1.0.1"
|
||||||
markdownify = "^0.13.1"
|
markdownify = "^0.13.1"
|
||||||
regex = "^2024.4.28"
|
regex = "^2024.4.28"
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
pytest = "^7.4.1"
|
pytest = "^7.4.1"
|
||||||
jupyter = "^1.0.0"
|
jupyter = "^1.0.0"
|
||||||
black = "*"
|
black = "*"
|
||||||
pre-commit = "*"
|
pre-commit = "*"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 88
|
||||||
|
|
|
@ -232,7 +232,7 @@ class GoogleJobsScraper(Scraper):
|
||||||
def _find_job_info_initial_page(html_text: str):
|
def _find_job_info_initial_page(html_text: str):
|
||||||
pattern = (
|
pattern = (
|
||||||
f'520084652":('
|
f'520084652":('
|
||||||
+ r"\[.*?\]\s*])\s*}\s*]\s*]\s*]\s*]\s*]"
|
+ r"\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\])"
|
||||||
)
|
)
|
||||||
results = []
|
results = []
|
||||||
matches = re.finditer(pattern, html_text)
|
matches = re.finditer(pattern, html_text)
|
||||||
|
|
Loading…
Reference in New Issue