Skip to content

Commit 7cb3eef

Browse files
Merge pull request #17
v3.11.10
2 parents 31a560c + 033b5e0 commit 7cb3eef

9 files changed

Lines changed: 524 additions & 426 deletions

File tree

.github/workflows/publish.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -71,53 +71,53 @@ jobs:
7171
name: dist
7272
path: dist
7373

74-
release:
75-
name: Release
76-
runs-on: ubuntu-latest
77-
needs: publish
78-
steps:
79-
- uses: actions/checkout@v4
80-
with:
81-
fetch-depth: 0
82-
- name: Get dist
83-
uses: actions/download-artifact@v4
84-
with:
85-
name: dist
86-
path: dist
87-
- name: Get Tag
88-
id: tag
89-
uses: olegtarasov/get-tag@v2.1.1
90-
- name: Clean CHANGELOG.md
91-
run: |
92-
touch CHANGELOG.md.tmp
93-
npm install -g prettier
94-
prettier --parser markdown --tab-width 4 --prose-wrap never CHANGELOG.md > CHANGELOG.md.tmp
95-
cat CHANGELOG.md.tmp > CHANGELOG.md
96-
- name: Build Release
97-
id: release
98-
uses: MatteoCampinoti94/changelog-to-release@v1.0.2
99-
with:
100-
version-name: ${{ steps.tag.outputs.tag }}
101-
- name: Build Release File
102-
env:
103-
TAG: ${{ steps.tag.outputs.tag }}
104-
RELEASE: ${{ steps.release.outputs.body }}
105-
run: |
106-
touch RELEASE.md
107-
PREVIOUS_TAG="$(git tag -l --sort=-version:refname | head -2 | tail -1)"
108-
printf "%s\n" "$RELEASE" > RELEASE.md
109-
printf "\n## 🔗 Links\n" >> RELEASE.md
110-
printf "\n* %s" "PyPi release: https://pypi.org/project/${GITHUB_REPOSITORY#*/}/${TAG#v}" >> RELEASE.md
111-
printf "\n* %s" "Full changelog: https://github.com/$GITHUB_REPOSITORY/compare/$PREVIOUS_TAG...$TAG" >> RELEASE.md
112-
cat RELEASE.md
113-
printf "\n\n## Dist Files\n"
114-
ls -l dist || echo " no files"
115-
- name: Create Release
116-
uses: softprops/action-gh-release@v1
117-
with:
118-
token: ${{ secrets.GITHUB_TOKEN }}
119-
tag_name: ${{ steps.tag.outputs.tag }}
120-
name: ${{ steps.release.outputs.title }}
121-
body_path: RELEASE.md
122-
files: |
123-
dist/*
74+
# release:
75+
# name: Release
76+
# runs-on: ubuntu-latest
77+
# needs: publish
78+
# steps:
79+
# - uses: actions/checkout@v4
80+
# with:
81+
# fetch-depth: 0
82+
# - name: Get dist
83+
# uses: actions/download-artifact@v4
84+
# with:
85+
# name: dist
86+
# path: dist
87+
# - name: Get Tag
88+
# id: tag
89+
# uses: olegtarasov/get-tag@v2.1.1
90+
# - name: Clean CHANGELOG.md
91+
# run: |
92+
# touch CHANGELOG.md.tmp
93+
# npm install -g prettier
94+
# prettier --parser markdown --tab-width 4 --prose-wrap never CHANGELOG.md > CHANGELOG.md.tmp
95+
# cat CHANGELOG.md.tmp > CHANGELOG.md
96+
# - name: Build Release
97+
# id: release
98+
# uses: MatteoCampinoti94/changelog-to-release@v1.0.2
99+
# with:
100+
# version-name: ${{ steps.tag.outputs.tag }}
101+
# - name: Build Release File
102+
# env:
103+
# TAG: ${{ steps.tag.outputs.tag }}
104+
# RELEASE: ${{ steps.release.outputs.body }}
105+
# run: |
106+
# touch RELEASE.md
107+
# PREVIOUS_TAG="$(git tag -l --sort=-version:refname | head -2 | tail -1)"
108+
# printf "%s\n" "$RELEASE" > RELEASE.md
109+
# printf "\n## 🔗 Links\n" >> RELEASE.md
110+
# printf "\n* %s" "PyPi release: https://pypi.org/project/${GITHUB_REPOSITORY#*/}/${TAG#v}" >> RELEASE.md
111+
# printf "\n* %s" "Full changelog: https://github.com/$GITHUB_REPOSITORY/compare/$PREVIOUS_TAG...$TAG" >> RELEASE.md
112+
# cat RELEASE.md
113+
# printf "\n\n## Dist Files\n"
114+
# ls -l dist || echo " no files"
115+
# - name: Create Release
116+
# uses: softprops/action-gh-release@v1
117+
# with:
118+
# token: ${{ secrets.GITHUB_TOKEN }}
119+
# tag_name: ${{ steps.tag.outputs.tag }}
120+
# name: ${{ steps.release.outputs.title }}
121+
# body_path: RELEASE.md
122+
# files: |
123+
# dist/*

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## v3.11.10
4+
5+
### Changes
6+
7+
* Remove gender parsing and set the `Submission.gender` property to `None`
8+
* See [June 18th, 2025- Hardware and Drop Down Updates](https://www.furaffinity.net/journal/11160892)
9+
10+
### Fixes
11+
12+
* Allow "^" characters in username URL names
13+
314
## v3.11.9
415

516
### Fixes
@@ -25,8 +36,8 @@
2536
### Fixes
2637

2738
* Fix next page of favorites
28-
* The selector path to the "Next" button had changed
29-
* The presence of the button is now tested
39+
* The selector path to the "Next" button had changed
40+
* The presence of the button is now tested
3041

3142
## v3.11.5
3243

faapi/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.11.9"
1+
__version__ = "3.11.10"

faapi/parse.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def check_page_raise(page: BeautifulSoup) -> None:
7373

7474

7575
def username_url(username: str) -> str:
76-
return sub(r"[^a-z\d.~`\[\]-]", "", username.lower())
76+
return sub(r"[^\^a-z\d.~`\[\]-]", "", username.lower())
7777

7878

7979
def inner_html(tag: Tag) -> str:
@@ -512,8 +512,7 @@ def parse_submission_page(sub_page: BeautifulSoup) -> dict[str, Any]:
512512

513513
tag_category1: Optional[Tag] = tag_info.select_one("span.category-name")
514514
tag_category2: Optional[Tag] = tag_info.select_one("span.type-name")
515-
tag_species: Optional[Tag] = (info_spans := tag_info.select("span"))[bool(tag_category1) + bool(tag_category2)]
516-
tag_gender: Optional[Tag] = info_spans[1 + bool(tag_category1) + bool(tag_category2)]
515+
tag_species: Optional[Tag] = tag_info.select("span")[bool(tag_category1) + bool(tag_category2)]
517516
tag_description: Optional[Tag] = sub_page.select_one("div.submission-description")
518517
tag_folder: Optional[Tag] = sub_page.select_one("a.button[href^='/scraps/'],a.button[href^='/gallery/']")
519518
tag_file_url: Optional[Tag] = sub_page.select_one("div.download a")
@@ -532,7 +531,6 @@ def parse_submission_page(sub_page: BeautifulSoup) -> dict[str, Any]:
532531
assert tag_type is not None, _raise_exception(ParsingError("Missing type tag"))
533532
assert tag_fav is not None, _raise_exception(ParsingError("Missing fav tag"))
534533
assert tag_species is not None, _raise_exception(ParsingError("Missing species tag"))
535-
assert tag_gender is not None, _raise_exception(ParsingError("Missing gender tag"))
536534
assert tag_description is not None, _raise_exception(ParsingError("Missing description tag"))
537535
assert tag_folder is not None, _raise_exception(ParsingError("Missing folder tag"))
538536
assert tag_file_url is not None, _raise_exception(ParsingError("Missing file URL tag"))
@@ -556,7 +554,6 @@ def parse_submission_page(sub_page: BeautifulSoup) -> dict[str, Any]:
556554
category += " / " + tag_category2.text.strip()
557555
category.strip()
558556
species: str = tag_species.text.strip()
559-
gender: str = tag_gender.text.strip()
560557
rating: str = tag_rating.text.strip()
561558
views: int = int(tag_views.text.strip())
562559
comment_count: int = int(tag_comment_count.text.strip())
@@ -577,11 +574,11 @@ def parse_submission_page(sub_page: BeautifulSoup) -> dict[str, Any]:
577574
thumbnail_url = f"{thumbnail_url.rsplit('/', 1)[0]}/{quote(thumbnail_url.rsplit('/', 1)[1])}" \
578575
if thumbnail_url else ""
579576
prev_sub: Optional[int] = int(
580-
get_attr(tag_prev, "href").split("/")[-2]
581-
) if tag_prev and tag_prev.text.lower() == "prev" else None
577+
get_attr(tag_prev, "href").strip("/").split("/")[-1]
578+
) if tag_prev and tag_prev.text.lower() == "newer" else None
582579
next_sub: Optional[int] = int(
583-
get_attr(tag_next, "href").split("/")[-2]
584-
) if tag_next and tag_next.text.lower() == "next" else None
580+
get_attr(tag_next, "href").strip("/").split("/")[-1]
581+
) if tag_next and tag_next.text.lower() == "older" else None
585582
fav_link: Optional[str] = f"{root}{href}" if (href := get_attr(tag_fav, "href")).startswith("/fav/") else None
586583
unfav_link: Optional[str] = f"{root}{href}" if (href := get_attr(tag_fav, "href")).startswith("/unfav/") else None
587584
user_folders: list[tuple[str, str, str]] = []
@@ -605,7 +602,7 @@ def parse_submission_page(sub_page: BeautifulSoup) -> dict[str, Any]:
605602
"tags": tags,
606603
"category": category,
607604
"species": species,
608-
"gender": gender,
605+
"gender": None,
609606
"rating": rating,
610607
"views": views,
611608
"comment_count": comment_count,

faapi/submission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def __init__(self, submission_page: Optional[BeautifulSoup] = None):
173173
self.tags: list[str] = []
174174
self.category: str = ""
175175
self.species: str = ""
176-
self.gender: str = ""
176+
self.gender: Optional[str] = None
177177
self.rating: str = ""
178178
self.stats: SubmissionStats = SubmissionStats(0, 0, 0)
179179
self.type: str = ""

0 commit comments

Comments
 (0)