Title: Did output_format='json' replace json_output=True · adbar/trafilatura · Discussion #205 · GitHub
Open Graph Title: Did output_format='json' replace json_output=True · adbar/trafilatura · Discussion #205
X Title: Did output_format='json' replace json_output=True · adbar/trafilatura · Discussion #205
Description: Did output_format='json' replace json_output=True
Open Graph Description: Python version 3.10.1 trafilatura version 1.2.1 I'm using the tutorial from: https://sempioneer.com/python-for-seo/how-to-extract-text-from-multiple-webpages-in-python/ Running the code presents th...
X Description: Python version 3.10.1 trafilatura version 1.2.1 I'm using the tutorial from: https://sempioneer.com/python-for-seo/how-to-extract-text-from-multiple-webpages-in-python/ Running the code present...
Opengraph URL: https://github.com/adbar/trafilatura/discussions/205
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Did output_format='json' replace json_output=True","text":"\u003cp dir=\"auto\"\u003ePython version 3.10.1\u003cbr\u003e\ntrafilatura version 1.2.1\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eI'm using the tutorial from: \u003ca href=\"https://sempioneer.com/python-for-seo/how-to-extract-text-from-multiple-webpages-in-python/\" rel=\"nofollow\"\u003ehttps://sempioneer.com/python-for-seo/how-to-extract-text-from-multiple-webpages-in-python/\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eRunning the code presents the following error:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ccode class=\"notranslate\"\u003eTypeError: extract() got an unexpected keyword argument 'json_output'\u003c/code\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003efrom this line of code:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\" a = trafilatura.extract(downloaded_url, json_output=True, with_metadata=True, include_comments = False,\n date_extraction_params={'extensive_search': True, 'original_date': True})\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode class=\"notranslate\"\u003e a = trafilatura.extract(downloaded_url, json_output=True, with_metadata=True, include_comments = False,\n date_extraction_params={'extensive_search': True, 'original_date': True})\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eI appear not to be the only one experiencing this issue:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"https://solveforum.com/forums/threads/solved-typeerror-xxxxx-got-an-unexpected-keyword-argument-xxxxxx.282347/\" rel=\"nofollow\"\u003ehttps://solveforum.com/forums/threads/solved-typeerror-xxxxx-got-an-unexpected-keyword-argument-xxxxxx.282347/\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://exerror.com/typeerror-extract-got-an-unexpected-keyword-argument-json_output/\" rel=\"nofollow\"\u003ehttps://exerror.com/typeerror-extract-got-an-unexpected-keyword-argument-json_output/\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eI went to the documents to see if I could figure out what the issue is. \u003ca href=\"https://trafilatura.readthedocs.io/en/latest/corefunctions.html?highlight=extract()#trafilatura.extract\" rel=\"nofollow\"\u003eDocumentation\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFrom here I see trafilatura.extract does not have \"json_output\". However, I do see \"output_format\". Are these interchangeable?\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe following seems to work:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\" a = trafilatura.extract(downloaded_url, output_format='json', with_metadata=True, include_comments = False,\n date_extraction_params={'extensive_search': True, 'original_date': True})\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode class=\"notranslate\"\u003e a = trafilatura.extract(downloaded_url, output_format='json', with_metadata=True, include_comments = False,\n date_extraction_params={'extensive_search': True, 'original_date': True})\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eHowever I want to be sure. I don't see anything in the Github changelog referencing this.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThank you\u003c/p\u003e","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003eHi \u003ca class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/BreezySMX/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/BreezySMX\"\u003e@BreezySMX\u003c/a\u003e, thanks for your feedback!\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThese arguments are now indeed deprecated in favor of \u003ccode class=\"notranslate\"\u003eoutput_format\u003c/code\u003e but the information might not be so easy to find. I added a corresponding error in \u003ca class=\"commit-link\" data-hovercard-type=\"commit\" data-hovercard-url=\"https://github.com/adbar/trafilatura/commit/24aa207742c9d2a9317f6ce15842ef32bd891e56/hovercard\" href=\"https://github.com/adbar/trafilatura/commit/24aa207742c9d2a9317f6ce15842ef32bd891e56\"\u003e\u003ctt\u003e24aa207\u003c/tt\u003e\u003c/a\u003e.\u003c/p\u003e","upvoteCount":1,"url":"https://github.com/adbar/trafilatura/discussions/205#discussioncomment-2713668"}}}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:65afacbc-013a-fb1f-3e98-52d1190814fc |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | DC30:1A2907:CBA81:104989:6AEBC35C |
| html-safe-nonce | eead837faac353616db5f793e9ff890f75ee3dac84aedf140e726bcaa9fced39 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzMwOjFBMjkwNzpDQkE4MToxMDQ5ODk6NkFFQkMzNUMiLCJ2aXNpdG9yX2lkIjoiMjA3MDQwMjQxNzE5MzM3MDQ2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d2bbb8c2cf007ec3c621981edfd748f7182c05a1b24d079fc44f89fc755ac23f |
| hovercard-subject-tag | discussion:4051804 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/adbar/trafilatura/205/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/2572b130a8bdb48963ae8a3f9b84061569f3d17da3043261f9f22cff3cea7649/adbar/trafilatura/discussions/205 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2572b130a8bdb48963ae8a3f9b84061569f3d17da3043261f9f22cff3cea7649/adbar/trafilatura/discussions/205 |
| og:image:alt | Python version 3.10.1 trafilatura version 1.2.1 I'm using the tutorial from: https://sempioneer.com/python-for-seo/how-to-extract-text-from-multiple-webpages-in-python/ Running the code presents th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4c39b5a5177867789999269ddf5ae2221b00c4ac9fe1487d3a72e97b69db173e |
| turbo-cache-control | no-preview |
| go-import | github.com/adbar/trafilatura git https://github.com/adbar/trafilatura.git |
| octolytics-dimension-user_id | 2125866 |
| octolytics-dimension-user_login | adbar |
| octolytics-dimension-repository_id | 180136168 |
| octolytics-dimension-repository_nwo | adbar/trafilatura |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 180136168 |
| octolytics-dimension-repository_network_root_nwo | adbar/trafilatura |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c520692f02ba50d045716bcd724a71f0fc5f7d96 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width