diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1ce90c3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +node_modules +dist +.git +.env +.env.local +*.log +npm-debug.log* +.DS_Store +.vscode +.idea +*.zip +*.tar.gz +dxspider-proxy/node_modules +iturhfprop-service/node_modules diff --git a/server.js b/server.js index 11c86c3..008ca99 100644 --- a/server.js +++ b/server.js @@ -734,16 +734,18 @@ app.get('/api/dxnews', async (req, res) => { const titleMatch = block.match(/title="([^"]+)"/); // Extract date const dateMatch = block.match(/(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})/); - // Extract description - text after the date, before "Views" or next element + // Extract description - text after the date, before stats const descParts = block.split(/\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}/); let desc = ''; if (descParts[1]) { - // Get text content, strip HTML tags + // Get text content, strip HTML tags, then remove stats/junk desc = descParts[1] .replace(/<[^>]+>/g, ' ') .replace(/\s+/g, ' ') - .replace(/Views\d+.*$/, '') - .replace(/More\.\.\..*$/, '') + .replace(/Views\s*\d+.*/i, '') + .replace(/Comments\s*\d+.*/i, '') + .replace(/\d+%/, '') + .replace(/More\.\.\..*/i, '') .trim() .substring(0, 200); } diff --git a/src/components/DXNewsTicker.jsx b/src/components/DXNewsTicker.jsx index 4e27c02..edf72db 100644 --- a/src/components/DXNewsTicker.jsx +++ b/src/components/DXNewsTicker.jsx @@ -40,8 +40,8 @@ export const DXNewsTicker = () => { if (contentRef.current && tickerRef.current) { const contentWidth = contentRef.current.scrollWidth; const containerWidth = tickerRef.current.offsetWidth; - // ~50px per second scroll speed - const duration = Math.max(30, (contentWidth + containerWidth) / 50); + // ~90px per second scroll speed + const duration = Math.max(20, (contentWidth + containerWidth) / 90); setAnimDuration(duration); } }, [news]);