Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AO3Bridge: move tags to categories and remove duplicate fic summary #4031

Merged
merged 2 commits into from Mar 28, 2024

Conversation

Phantop
Copy link
Contributor

@Phantop Phantop commented Mar 25, 2024

No description provided.

Copy link

github-actions bot commented Mar 25, 2024

Pull request artifacts

Bridge Context Status
AO3 1 List (current) ✔️
AO3 1 List (pr) ✔️
AO3 2 Bookmarks (current) ✔️
AO3 2 Bookmarks (pr) ✔️
AO3 3 Work (current) ✔️
AO3 3 Work (pr) ✔️

last change: Wednesday 2024-03-27 20:49:41

@dvikan dvikan merged commit db984d8 into RSS-Bridge:master Mar 28, 2024
7 checks passed
@@ -123,6 +137,10 @@ private function collectList($url)
$response = $httpClient->request($url, $agent);
$html = \str_get_html($response->getBody());
$html = defaultLinkTo($html, self::URI);
// remove duplicate fic summary
if ($ficsum = $html->find('#workskin > .preface > .summary', 0)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for next time, please dont do assignment inside if statements.

@dvikan
Copy link
Contributor

dvikan commented Mar 31, 2024

the change introduced this error:

[2024-03-31 00:50:53] rssbridge.ERROR Exception in RssBridge::main() {
    "type": "Error",
    "code": 0,
    "message": "Call to a member function find() on null",
    "file": "bridges/AO3Bridge.php",
    "line": 81,
    "url": "https://rss-bridge.org/bridge01/?action=display&bridge=AO3Bridge&context=List&url=https%3A%2F%2Farchiveofourown.org%2Fusers%2FDraconicHex%2Fpseuds%2FDraconicHex&format=Atom",
    "trace": [
        "index.php(72): RssBridge->main()",
        "lib/RssBridge.php(103): DisplayAction->execute()",
        "actions/DisplayAction.php(68): DisplayAction->createResponse()",
        "actions/DisplayAction.php(118): AO3Bridge->collectData()",
        "bridges/AO3Bridge.php(57): AO3Bridge->collectList()",
        "bridges/AO3Bridge.php(81)"
    ]
}

@Phantop
Copy link
Contributor Author

Phantop commented Mar 31, 2024

the change introduced this error:

[2024-03-31 00:50:53] rssbridge.ERROR Exception in RssBridge::main() {
    "type": "Error",
    "code": 0,
    "message": "Call to a member function find() on null",
    "file": "bridges/AO3Bridge.php",
    "line": 81,
    "url": "https://rss-bridge.org/bridge01/?action=display&bridge=AO3Bridge&context=List&url=https%3A%2F%2Farchiveofourown.org%2Fusers%2FDraconicHex%2Fpseuds%2FDraconicHex&format=Atom",
    "trace": [
        "index.php(72): RssBridge->main()",
        "lib/RssBridge.php(103): DisplayAction->execute()",
        "actions/DisplayAction.php(68): DisplayAction->createResponse()",
        "actions/DisplayAction.php(118): AO3Bridge->collectData()",
        "bridges/AO3Bridge.php(57): AO3Bridge->collectList()",
        "bridges/AO3Bridge.php(81)"
    ]
}

Ah my mistake! I hadn't thought to test against user pages. The issue can be fixed by removing the > in the selector on line 80, I'm fairly certain. I can open a new PR with the change, if you'd like.

@dvikan
Copy link
Contributor

dvikan commented Mar 31, 2024

yes pls make pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants