wikipedia-crawler icon indicating copy to clipboard operation
wikipedia-crawler copied to clipboard

Fix title output

Open CodeCanna opened this issue 3 years ago • 2 comments

I fixed the title output, title output is now what it's expected to be.

CodeCanna avatar Jul 03 '21 07:07 CodeCanna

I'm still new at this, am I pushing the correctly on here?

CodeCanna avatar Jul 03 '21 08:07 CodeCanna

I also ran into this issue (#1), however had a slightly different fix.

I changed this line

https://github.com/hardikvasa/wikipedia-crawler/blob/82f4dc7b5390a3ef62e6f0e50c1efe75e2aa8c6a/wiki-crawler.py#L30

to:

    start_title = page.find("<span class=\"mw-page-title-main")

This will pull only the article title (e.g. Spacetime) and not the window title (e.g. Spacetime - Wikipedia).

dvanbrug avatar Aug 01 '23 17:08 dvanbrug