Commit Graph
12 Commits
Author SHA1 Message Date
AndvariandTony 673aad4540 fix(route/thepaper): Avoid destructuring string when parsing tags (#14383)
* Update utils.js

* Update lib/v2/thepaper/utils.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

---------
2024-02-07 18:32:40 +08:00
Tony 6d901cb7dc style(eslint): add eslint-unicorn (#14257)
* style: add eslint-unicorn

* style: fix unicorn/no-useless-spread

* style: fix unicorn/no-useless-promise-resolve-reject

* style: fix unicorn/no-for-loop

* fix: codeql bad HTML filtering regexp

* fix: codeql incomplete replace

* fix: unicorn/no-abusive-eslint-disable

* style: fix unicorn/no-new-array

* style: fix unicorn/no-typeof-undefined

* style: fix unicorn/no-zero-fractions

* style: fix unicorn/no-empty-file

* style: fix unicorn/prefer-date-now

* revert: auto fix unicorn/prefer-switch on lib/v2/kuaidi100/utils.js

* style: fix unicorn/prefer-array-find

* style: fix unicorn/prefer-array-flat

* style: fix unicorn/prefer-array-flat-map

* style: fix unicorn/prefer-at

* style: fix unicorn/prefer-string-starts-ends-with

* style: fix unicorn/prefer-includes

* fix: codeql URL substring sanitization

* style: fix unicorn/prefer-optional-catch-binding

* style: fix unicorn/catch-error-name

* style: fix unicorn/escape-case

* style: fix unicorn/prefer-native-coercion-functions

* style: fix unicorn/prefer-regexp-test

* style: fix unicorn/require-array-join-separator

* style: fix unicorn/prefer-math-trunc

* style: fix unicorn/prefer-negative-index

* style: fix unicorn/prefer-dom-node-dataset

* style: fix unicorn/prefer-dom-node-text-content

* style: fix unicorn/prefer-query-selector

* style: fix unicorn/no-array-for-each

* style: fix unicorn/no-negated-condition

* style: fix unicorn/prefer-add-event-listener

* style: fix unicorn/import-style

* style: fix prefer-regex-literals

* style: disable unicorn/no-useless-switch-case

* style: disable unicorn/text-encoding-identifier-case

* style: fix unicorn/prefer-set-has

* style: fix unicorn/prefer-spread

* revert: auto fix on lib/routes/universities/ynnu/edu/base64.js

* style: fix unicorn/no-useless-undefined

* style: fix unicorn/no-array-push-push

* style: fix unicorn/no-useless-undefined again

* style: fix unicorn/no-lonely-if

* style: fix unicorn/prefer-reflect-apply

* style: fix unicorn/switch-case-braces

* style: fix unicorn/prefer-switch

* style: fix unicorn/prefer-array-some

* fix: deepscan UNUSED_VAR_ASSIGN

* style: fix unicorn/prefer-ternary

* fix: follow-up of unicorn/prefer-ternary

* revert: auto fix of unicorn/prefer-string-slice for substring()

* style: disable unicorn/prefer-string-slice

fix: auto fix slice over deprecated substr

* style: fix unicorn/throw-new-error

* style: fix unicorn/filename-case

* test: fix dateParser renaming

* style: fix unicorn/better-regex

* style: fix unicorn/prefer-string-replace-all

* fix(deps): add sanitize-html

* style: fix no-prototype-builtins

* style: fix unicorn/consistent-destructuring

* style: fix unicorn/consistent-function-scoping

* style: fix unicorn/prefer-regexp-test

* style: fix unicorn/prefer-logical-operator-over-ternary

* style: fix unicorn/no-array-callback-reference

* style: add prefer-object-has-own

* style: warn unicorn/no-empty-file

* style: fix unicorn/prefer-number-properties

* style: fix no-useless-undefined again

* style: fix unicorn/numeric-separators-style

* style: disable unicorn/no-array-callback-reference

false postive with cheerio
2024-01-18 20:43:40 +08:00
Andvari fcff1240e9 feat(route): Add query parameter to control full text fetching function (#13404)
* 澎湃新闻图片及视频与正文重复
Fixes #13401

* Save cache to different path for each mode.

* Update website/docs/routes/traditional-media.md

* Add text content to full text if the source is of video type.

---------
2023-09-27 19:44:28 +08:00
Andvari f641a2ad7c feat(route): refine category list for thepaper. (#13178)
* feat(route): refine category for thepaper.

* Update utils.js
2023-09-01 22:38:42 +08:00
Tony 589ddb3a43 refactor(eslint): add back no-return-await (#11877)
* chore: add back no-return-await

* chore: fix action warning

* chore: fix all no-return-await
2023-02-16 04:30:05 +08:00
Felix Hsu d6350409a1 refactor(route): thepaper utils with cleaner structure (#11808)
* remove the timezone shift for thepaper page, cause it is already shifted

* optimize code
2023-02-09 21:22:42 +08:00
Felix Hsu 6073a332ec fix(route): remove the timezone shift for thepaper page, cause it is already shifted (#11795) 2023-02-07 19:19:23 +08:00
Felix Hsu fe4f6505d5 fix(route): thepaper pic list feature page error (#11198)
* 1. fix timezone shift 2. add podcast for voice article 3.use list icon for list feed 4. category support

* extract logo using cheerio

* fix the fallback logo image on list feed

* fix the deepscan insufficient null checking

* add support for album type article

* video playback not working correctly on weixin

* fix thepaper pic list

* fix thepaper pic list deepscan
2022-11-02 20:11:05 +08:00
Felix Hsu adaf63670a fix(thepaper): thepaper video cannot playback in fullscreen correctly (#10908)
* 1. fix timezone shift 2. add podcast for voice article 3.use list icon for list feed 4. category support

* extract logo using cheerio

* fix the fallback logo image on list feed

* fix the deepscan insufficient null checking

* add support for album type article

* video playback not working correctly on weixin
2022-09-26 21:12:18 +08:00
Felix Hsu b053af1050 refactor: refactor thepaper utils for optimize rss reading (#10859)
* 1. fix timezone shift 2. add podcast for voice article 3.use list icon for list feed 4. category support

* extract logo using cheerio

* fix the fallback logo image on list feed

* fix the deepscan insufficient null checking

* add support for album type article
2022-09-22 22:47:09 +08:00
Felix Hsu fe50f9cb18 fix(route): thepaper changes its site to nextjs based backend, so change the feeder (#10850)
* fix(route) thepaper now use nextjs as backend

* Id to Name for channel and list

* summary ok

* determine the detail by null check instead of type check

* list_url for better reading

* add failback of thumbnail

* fix video article

* add list for thepaper

* add list for thepaper

* del the dup line

* small fix and optimize

* add maintainer
2022-09-21 22:53:50 +08:00
Ethan Shen 8ecad32db2 feat(route): add 澎湃明查 (#9380)
* feat(route): add 澎湃明查

* fix: 839studio routes

* docs: update example url

* fix: parseDate
2022-03-25 22:05:27 +08:00