sync with Kovid's branch

This commit is contained in:
Tomasz Długosz 2013-02-09 23:02:51 +01:00
commit cad1e9dab3
349 changed files with 123456 additions and 102899 deletions

View File

@ -19,6 +19,234 @@
# new recipes:
# - title:
- version: 0.9.18
date: 2013-02-08
new features:
- title: "New metadata source: Edelweiss, a catalog of books that is updated directly by publishers. To enable it, go to Preferences->Metadata download and enable the Edelweiss plugin."
tickets: [1091073]
- title: "Add an option to add extra spacing between rows in the book list. (Preferences->Look & Feel)"
tickets: [1117907]
- title: "Column coloring/icons: Add a 'days ago' condition, useable with columns that store dates to set colors/icons based on the number of days before today"
- title: "E-book viewer: Add shortcuts Ctrl+= and Ctrl+- to increase/decrease text size."
tickets: [ 1117524 ]
- title: "When showing possible duplicates after adding books, also show the file formats."
- title: "Driver for Trekstor Ventos Tablet"
bug fixes:
- title: "Conversion: When transliterating unicode characters, handle « and » correctly."
tickets: [1117270]
- title: "Fix adding books from multiple directories with multiple books per directory treating opf files as an ebook"
- title: "Fix download metadata window not resizable on smaller screens"
tickets: [1116849]
- title: "Tweak Book: When rebuilding azw3 files handle <a> tags that have name but not id attribute, these are apparently produced by kindlegen."
tickets: [ 1112934 ]
- title: "Fix regression in advanced column color rules."
tickets: [1118678]
improved recipes:
- El Mundo today
- fluter.de
- Birmingham Post
- Japan Times
- The Toronto Star
- Le Monde (subscription version)
- Globe and Mail
new recipes:
- title: VICE Magazine Deutschland
author: Alex
- title: Libertad Digital
author: Darko Miletic
- version: 0.9.17
date: 2013-02-01
new features:
- title: "Allow adding user specified icons to the main book list for books whose metadata matches specific criteria. Go to Preferences->Look & Feel->Column icons to setup these icons. They work in the same way as the column coloring rules."
type: major
- title: "Allow choosing which page of a PDF to use as the cover."
description: "To access this functionality add the PDF to calibre then click the edit metadata button. In the top right area of the edit metadata dialog there is a button to get the cover from the ebook file, this will now allow you to choose which page (from the first ten pages) of the pdf to use as the cover."
tickets: [1110019]
- title: "Add option to turn off reflections in the cover browser (Preferences->Look & Feel->Cover Browser)"
- title: "PDF Output: Add an option to add page numbers to the bottom of every page in the generated PDF file (look in the PDF Output section of the conversion dialog)"
- title: "Add the full item name to the tool tip of a leaf item displayed in the tag browser."
tickets: [1106231]
bug fixes:
- title: "Fix out-of-bounds data causing errors in the Tag Browser"
tickets: [1108017]
- title: "Conversion: Handle input documents that use multiple prefixes referring to the XHTML namespace correctly."
tickets: [1107220]
- title: "PDF Output: Fix regression that caused some svg images to be rendered as black rectangles."
tickets: [1105294]
- title: "Metadata download: Only normalize title case if the result has no language set or its language is English"
improved recipes:
- Baltimore Sun
- Harvard Business Review
- Victoria Times
- South China Morning Post
- Volksrant
- Seattle Times
new recipes:
- title: Dob NeviNosti
author: Darko Miletic
- title: La Nacion (CR)
author: Douglas Delgado
- version: 0.9.16
date: 2013-01-25
new features:
- title: "News download: Add support for logging in to sites that require javascript for their logins."
tickets: [1101809]
- title: "News download: Do not convert all downloaded images to JPG format. This fixes the problem of PNG images with transparent backgrounds being rendered with black backgrounds"
- title: "CHM Input: Support hierarchical table of contents. Do not generate an inline table of contents when a metadata table of contents is present. Also correctly decode the text in the table of contents"
- title: "Get Books: Add the beam-ebooks.de store"
- title: "Make custom yes/no columns using icons put text values under the icons."
- title: "Driver for LG E400 and SayCoolA710"
tickets: [1103741,1104528]
- title: "Speed up device connection when there are lots of books on the device by not generating cover thumbnails unless they are actually needed."
- title: "Have the metadata download dialog remember its last used size."
tickets: [1101150]
bug fixes:
- title: "Fix deleting a custom column that was used in a column coloring rule makes the column coloring preferences panel unusable"
tickets: [1103504]
- title: "Store caches outside the config directory for non-portable calibre installs"
- title: "PDF Output: Dont crash if the user has a font on his system that is missing the OS/2 table"
tickets: [1102403]
- title: "Conversion: Do not error out because of an error in user supplied search replace rules."
tickets: [1102647]
- title: "Conversion: Replace all non-ascii characters in CSS class names, as they cause problems with some broken EPUB renderers."
tickets: [1102587]
- title: "Do not choke when reading metadata from MOBI files with incorrectly encoded metadata fields"
- title: "Conversion: Preserve ToC entries that point nowhere instead of causing them to point to a non-existent file"
- title: "E-book viewer: Allow entries in the Table of Contents that do not point anywhere, instead of just ignoring them."
- title: "Content server: Fix the 'Previous' link in the mobile version of the content server webpage skipping an entry"
tickets: [1101124]
improved recipes:
- TSN
- St. Louis Post Dispatch
- Metro UK
- Michelle Malkin
- Barrons
new recipes:
- title: Contemporary Argentine Writers
author: Darko Miletic
- version: 0.9.15
date: 2013-01-18
new features:
- title: "Linux MTP driver: Detect devices that have MTP interfaces even if their USB ids are not known"
- title: "Content server: Allow picking a random book by clicking the 'Random book' link on the start page. You can also refresh the random book page to get a new random book"
- title: "E-book viewer: Add an option to hide the toolbars in the viewer window (Preferences->Miscellaneous->Show controls in the viewr preferences). You can unhide them by right clicking in the viewer window."
- title: "Kobo driver: Speedup initial connect by avoiding unnecessary update of series metadata in some situations."
tickets: [1099190]
- title: "Get Books: Allow the store plugins to be dynamically loaded so that future website changes of a store dont require a calibre update to fix Get Books."
- title: "Wireless driver: Always replace file when resending a previously sent book to the device, even if the title/author have changed."
- title: "Add PocketBook Pro 912 driver."
tickets: [1099571]
- title: "When creating/exporting epub and mobi files, add the calibre book identifier as a special field in the book's metadata. This allows third party tools to identify the book record in calibre to which the file belongs."
- title: "Wireless driver: Add support for using the book uuid as the filename"
- title: "Remove the experimental tag from the subset fonts feature, since there has been only one reported problem (now fixed) with it in the two months since it was released"
bug fixes:
- title: "Get Books: Update the amazon, waterstones and libri.de plugins to account for website changes"
- title: "MOBI Input: Do not choke on MOBI files with incorrectly encoded titles."
tickets: [1100601]
- title: "Font subsetting: Fix a bug in the parsing of the GSUB table that could cause some ligatures to not be included in the subset font"
- title: "E-book-viewer: Fix TOC links without anchors not scrolling to the top of the current flow"
- title: "LIT Input: Handle lit files that set an incorrect XML mimetype for their text."
tickets: [1099621]
- title: "Catalogs: Fix 'X' being droppen from isbns on export"
tickets: [1098325]
- title: "Fix an error when editing date in the main book list and all visible dates are blank."
tickets: [1098675]
- title: "Fix calibre-smtp using incorrect escaping for non-ascii attachment filenames"
tickets: [1098478]
- title: "Conversion: When subsetting fonts, handle multiple @font-face rules referring to the same physical font"
- title: "Content server: Update metadata when serving azw3 files"
- title: "CHM Input: Handle chm files that contain files with url unsafe filenames."
tickets: [1100610]
- title: "Content server: Fix custom icons for top level categories incorrect."
tickets: [1095016]
- title: "Kobo driver: When resending a file to the device, update the filesize in the Kobo db to prevent the device from deleting the file."
tickets: [1100607]
improved recipes:
- The Chronicle of Higher Education
- Smithsonian Magazine
- Philosophy Now
- The Economist
- Business Week Magazine
new recipes:
- title: Asco de Vida
author: Krittika Goyal
- title: Schattenblick
author: ThB
- version: 0.9.14
date: 2013-01-11

366
imgsrc/polish.svg Normal file
View File

@ -0,0 +1,366 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.45"
version="1.0"
sodipodi:docname="edit-clear.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/actions">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient6019">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6021" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6023" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5999">
<stop
style="stop-color:#c4a000;stop-opacity:1;"
offset="0"
id="stop6001" />
<stop
style="stop-color:#c4a000;stop-opacity:0;"
offset="1"
id="stop6003" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5987">
<stop
style="stop-color:#d7c20f;stop-opacity:1"
offset="0"
id="stop5989" />
<stop
style="stop-color:#b6970d;stop-opacity:1"
offset="1"
id="stop5991" />
</linearGradient>
<linearGradient
id="linearGradient5981"
inkscape:collect="always">
<stop
id="stop5983"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop5985"
offset="1"
style="stop-color:#ffffff;stop-opacity:0.69411765" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5996">
<stop
style="stop-color:#8f5902;stop-opacity:1;"
offset="0"
id="stop5998" />
<stop
style="stop-color:#73521e;stop-opacity:1"
offset="1"
id="stop6000" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5984">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop5986" />
<stop
style="stop-color:#ffffff;stop-opacity:0.13438736"
offset="1"
id="stop5988" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5974">
<stop
style="stop-color:#ad7fa8;stop-opacity:1;"
offset="0"
id="stop5976" />
<stop
style="stop-color:#dac6d8;stop-opacity:1"
offset="1"
id="stop5978" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5966">
<stop
style="stop-color:#fdef72;stop-opacity:1"
offset="0"
id="stop5968" />
<stop
style="stop-color:#e2cb0b;stop-opacity:1"
offset="1"
id="stop5970" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5958">
<stop
style="stop-color:#c17d11;stop-opacity:1;"
offset="0"
id="stop5960" />
<stop
style="stop-color:#e9b96e;stop-opacity:1"
offset="1"
id="stop5962" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5958"
id="linearGradient5964"
x1="28"
y1="16"
x2="26"
y2="8"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-2,0)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5966"
id="linearGradient5972"
x1="20.933708"
y1="25.060659"
x2="30.208115"
y2="30.742676"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-2,0)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5974"
id="linearGradient5980"
x1="27.651777"
y1="23.145937"
x2="21.59099"
y2="20.618719"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9768193,0,0,1,-1.3746633,0)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5984"
id="linearGradient5994"
gradientUnits="userSpaceOnUse"
x1="28"
y1="8"
x2="33.447109"
y2="16.685888" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5996"
id="linearGradient6002"
x1="30.324829"
y1="9.2407961"
x2="34"
y2="18"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-2,0)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5981"
id="linearGradient5973"
gradientUnits="userSpaceOnUse"
x1="22.319767"
y1="41.955986"
x2="18.985712"
y2="37.029255"
gradientTransform="translate(-2,0)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5987"
id="linearGradient5993"
x1="17.032078"
y1="27.446827"
x2="29.494455"
y2="37.845814"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-2,0)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5999"
id="linearGradient6005"
x1="27.354809"
y1="36.218422"
x2="23.489431"
y2="34.728424"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-2,0)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6019"
id="radialGradient6025"
cx="38"
cy="69"
fx="28.603323"
fy="69"
r="20"
gradientTransform="matrix(1,0,0,0.45,0,37.95)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#f6aaaa"
borderopacity="1"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="37.14966"
inkscape:cy="21.336383"
inkscape:document-units="px"
inkscape:current-layer="layer1"
width="48px"
height="48px"
inkscape:showpageshadow="false"
showgrid="false"
gridspacingx="0.5px"
gridspacingy="0.5px"
gridempspacing="2"
inkscape:grid-points="true"
inkscape:window-width="862"
inkscape:window-height="875"
inkscape:window-x="12"
inkscape:window-y="50"
inkscape:object-paths="true"
inkscape:object-nodes="true"
objecttolerance="6"
gridtolerance="6"
guidetolerance="6"
showborder="false">
<inkscape:grid
type="xygrid"
id="grid5333"
spacingx="0.5px"
spacingy="0.5px"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Ulisse Perusin</dc:title>
</cc:Agent>
</dc:creator>
<cc:license
rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
<dc:source>uli.peru@gmail.com</dc:source>
<dc:title>edit-clear</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Livello 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="arc"
style="opacity:0.25;fill:url(#radialGradient6025);fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:20;stroke-dasharray:none;stroke-opacity:1"
id="path6017"
sodipodi:cx="38"
sodipodi:cy="69"
sodipodi:rx="20"
sodipodi:ry="9"
d="M 58,69 A 20,9 0 1 1 18,69 A 20,9 0 1 1 58,69 z"
transform="matrix(1,0,0,0.6666668,-13.999999,-5.0000087)" />
<path
style="fill:url(#linearGradient5964);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6002);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 34.59375,2.46875 C 26.390533,2.5744003 25.19695,18.716276 22.84375,21.625 L 26.84375,23.0625 C 29.475623,18.689953 42.599746,4.1545034 35.40625,2.5 C 35.12676,2.4690309 34.85837,2.4653419 34.59375,2.46875 z M 33.5625,4.53125 C 33.756063,4.5125114 33.930486,4.5369694 34.09375,4.625 C 34.746806,4.9771226 34.817405,6.1198771 34.25,7.15625 C 33.682595,8.1926229 32.684304,8.7583725 32.03125,8.40625 C 31.378197,8.0541272 31.307595,6.9113729 31.875,5.875 C 32.300554,5.0977202 32.981812,4.5874659 33.5625,4.53125 z"
id="path5371" />
<path
sodipodi:type="inkscape:offset"
inkscape:radius="-1.0049498"
inkscape:original="M 36.59375 2.46875 C 28.390533 2.5744003 27.19695 18.716276 24.84375 21.625 L 28.84375 23.0625 C 31.475623 18.689953 44.599746 4.1545034 37.40625 2.5 C 37.12676 2.4690309 36.85837 2.4653419 36.59375 2.46875 z "
style="opacity:0.26666667;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5994);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path5992"
d="M 36.59375,3.46875 C 34.872132,3.4909229 33.585825,4.3246243 32.40625,5.75 C 31.226675,7.1753757 30.257916,9.1916354 29.46875,11.34375 C 28.679584,13.495865 28.04471,15.77802 27.46875,17.71875 C 27.068859,19.066206 26.698893,20.125198 26.25,21.0625 L 28.4375,21.84375 C 30.056094,19.348126 33.476298,15.252572 35.96875,11.21875 C 37.294589,9.0729934 38.25245,7.0407089 38.46875,5.65625 C 38.5769,4.9640206 38.513818,4.4833206 38.34375,4.1875 C 38.179059,3.9010309 37.880274,3.6629145 37.21875,3.5 C 37.019255,3.4812162 36.817917,3.4658629 36.59375,3.46875 z"
transform="translate(-2,0)" />
<path
style="fill:url(#linearGradient5972);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5993);stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:20;stroke-dasharray:none;stroke-opacity:1"
d="M 20.5,16.5 C 21.209506,18.503007 19.958612,20.237831 19.5,21.5 C 14.308433,23.045674 10.713199,31.203726 5.3674175,35.453585 C 6.0352055,36.150983 6.819644,36.897763 7.5,37.5 L 11.5625,33.96875 L 8.494944,38.493399 C 10.704181,40.284382 13,41.5 14.5,42 L 17.25,38.34375 L 15.5,42.5 C 16.951994,43.088882 20.485286,43.982025 22.5,44 L 24.50389,40.597503 L 23.990721,44.0625 C 24.820284,44.220859 26.428886,44.436716 27.5,44.46875 C 30.862186,38.96875 31.5,30 29.5,26 C 29,24 31,21.5 32.5,20.5 C 30,18.5 24.294411,16.196274 20.5,16.5 z"
id="path5367"
sodipodi:nodetypes="cccccccccccccccc" />
<path
style="opacity:0.26666667;fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 9,38.5 C 13.816495,33.489105 13.465023,31.296074 19.116117,26.972272 C 16.133675,31.800703 15.650278,34.31233 12,40.5 L 9,38.5 z"
id="path5975"
sodipodi:nodetypes="cccc" />
<path
style="opacity:0.41568627;fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 16.149808,42.202452 L 20.495835,32.362305 C 22.160348,29.378578 23.355507,26.392253 25.024808,24.014952 C 23.422854,29.432989 20.134118,36.136745 17.493558,42.639952 L 16.149808,42.202452 z"
id="path5979"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:0.47843137;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5973);stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 21.625,17.5 C 21.721738,19.415146 20.702057,21.029645 20.40625,21.84375 C 20.302147,22.128459 20.07092,22.348124 19.78125,22.4375 C 14.327852,24.672144 12.151447,31.011538 6.7866116,35.523667 C 6.988254,35.723521 7.2786424,35.940971 7.4811412,36.131898 L 16.5,28.5 L 9.923385,38.310313 C 11.193418,39.337926 12.645586,40.194857 14.150041,40.799478 L 21.144394,31.5 L 16.869501,41.911612 C 18.46507,42.437269 19.967804,42.738908 21.81451,43 L 26.43324,35.3125 L 25.0625,43.219317 L 26.9375,43.445312 C 28.370713,40.909818 29.069882,37.778782 29.46875,34.65625 C 29.892695,31.337404 29.463786,28.115072 28.625,26.4375 C 28.597837,26.377291 28.576895,26.314465 28.5625,26.25 C 28.215642,24.862569 28.731642,23.504373 29.4375,22.375 C 29.864393,21.691971 30.367872,21.084221 30.902459,20.573223 C 29.730977,19.790532 28.315762,19.113157 26.53125,18.46875 C 24.769173,17.832444 23.033252,17.518725 21.625,17.5 z"
id="path6014"
sodipodi:nodetypes="csccccccccccccsssscsc" />
<path
style="opacity:0.24705882;fill:url(#linearGradient6005);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 18.96875,43 C 21.146316,37.248129 25.364666,32.931057 26.985663,27.064588 C 27.037206,30.726661 27.235383,37.268314 25.09375,43.78125 C 24.773984,43.783025 24.919823,43.670441 24.62387,43.662697 L 25.424662,37.93818 L 22.143176,43.492564 C 19.952368,43.33624 20.848565,43.525163 18.96875,43 z"
id="path5977"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.48235294;fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 21.003067,22.610447 C 19.751072,23.226826 18.940858,24.137725 18.019961,24.974835 C 19.246448,24.266192 20.398947,23.525841 22.019534,22.986097 L 21.003067,22.610447 z"
id="path5995"
sodipodi:nodetypes="cccc" />
<path
style="opacity:0.48235294;fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.008698,23.061049 L 21.992233,25.049787 L 24.972946,23.461537 L 23.008698,23.061049 z"
id="path5997"
sodipodi:nodetypes="cccc" />
<path
style="opacity:0.48235294;fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 22.939805,17.961399 L 22.044612,19.668421 L 23.610339,20.170505 L 22.939805,17.961399 z"
id="path6007"
sodipodi:nodetypes="cccc" />
<path
style="opacity:0.48235294;fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 29.923254,19.88537 L 27.463006,21.720817 L 29.028733,22.222901 L 29.923254,19.88537 z"
id="path6009"
sodipodi:nodetypes="cccc" />
<path
style="opacity:0.48235294;fill:#c4a000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 26.012925,17.938566 L 24.499014,20.46318 L 26.064741,20.965264 L 26.012925,17.938566 z"
id="path6011"
sodipodi:nodetypes="cccc" />
<path
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="M 18.967726,22.024699 C 18.400946,19.059215 28.300561,24.177602 30.004548,25.019068 C 29.998066,26.098136 30.004548,27.019068 29.027729,27.019068 C 26.460191,25.626088 22.492474,23.413925 18.967726,22.024699 z"
id="path6013"
sodipodi:nodetypes="cccc" />
<path
style="fill:url(#linearGradient5980);fill-opacity:1;fill-rule:evenodd;stroke:#5c3566;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="M 18.650133,21.5 C 18.161723,20.5 18.650133,19.5 19.626953,19.5 C 23.618393,20.475417 26.951828,21.706232 30.371965,23.5 C 30.860375,24.5 30.371965,25.5 29.395146,25.5 C 25.861203,23.63558 22.528435,22.425187 18.650133,21.5 z"
id="path5373"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -158,13 +158,23 @@ My device is not being detected by |app|?
Follow these steps to find the problem:
* Make sure that you are connecting only a single device to your computer at a time. Do not have another |app| supported device like an iPhone/iPad etc. at the same time.
* If you are connecting an Apple iDevice (iPad, iPod Touch, iPhone), use the 'Connect to iTunes' method in the 'Getting started' instructions in `Calibre + Apple iDevices: Start here <http://www.mobileread.com/forums/showthread.php?t=118559>`_.
* Make sure you are running the latest version of |app|. The latest version can always be downloaded from `the calibre website <http://calibre-ebook.com/download>`_.
* Ensure your operating system is seeing the device. That is, the device should show up in Windows Explorer (in Windows) or Finder (in OS X).
* Make sure that you are connecting only a single device to your computer
at a time. Do not have another |app| supported device like an iPhone/iPad
etc. at the same time.
* If you are connecting an Apple iDevice (iPad, iPod Touch, iPhone), use
the 'Connect to iTunes' method in the 'Getting started' instructions in
`Calibre + Apple iDevices: Start here <http://www.mobileread.com/forums/showthread.php?t=118559>`_.
* Make sure you are running the latest version of |app|. The latest version
can always be downloaded from `the calibre website <http://calibre-ebook.com/download>`_.
You can tell what version of |app| you are currently running by looking
at the bottom line of the main |app| window.
* Ensure your operating system is seeing the device. That is, the device
should show up in Windows Explorer (in Windows) or Finder (in OS X).
* In |app|, go to Preferences->Ignored Devices and check that your device
is not being ignored
* If all the above steps fail, go to Preferences->Miscellaneous and click debug device detection with your device attached and post the output as a ticket on `the calibre bug tracker <http://bugs.calibre-ebook.com>`_.
* If all the above steps fail, go to Preferences->Miscellaneous and click
debug device detection with your device attached and post the output as a
ticket on `the calibre bug tracker <http://bugs.calibre-ebook.com>`_.
My device is non-standard or unusual. What can I do to connect to it?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -540,9 +550,9 @@ Yes, you can. Follow the instructions in the answer above for adding custom colu
How do I move my |app| library from one computer to another?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Simply copy the |app| library folder from the old to the new computer. You can find out what the library folder is by clicking the calibre icon in the toolbar. The very first item is the path to the library folder. Now on the new computer, start |app| for the first time. It will run the Welcome Wizard asking you for the location of the |app| library. Point it to the previously copied folder. If the computer you are transferring to already has a calibre installation, then the Welcome wizard wont run. In that case, click the calibre icon in the tooolbar and point it to the newly copied directory. You will now have two calibre libraries on your computer and you can switch between them by clicking the calibre icon on the toolbar.
Simply copy the |app| library folder from the old to the new computer. You can find out what the library folder is by clicking the calibre icon in the toolbar. The very first item is the path to the library folder. Now on the new computer, start |app| for the first time. It will run the Welcome Wizard asking you for the location of the |app| library. Point it to the previously copied folder. If the computer you are transferring to already has a calibre installation, then the Welcome wizard wont run. In that case, right-click the |app| icon in the tooolbar and point it to the newly copied directory. You will now have two calibre libraries on your computer and you can switch between them by clicking the |app| icon on the toolbar. Transferring your library in this manner preserver all your metadata, tags, custom columns, etc.
Note that if you are transferring between different types of computers (for example Windows to OS X) then after doing the above you should also right-click the calibre icon on the tool bar, select Library Maintenance and run the Check Library action. It will warn you about any problems in your library, which you should fix by hand.
Note that if you are transferring between different types of computers (for example Windows to OS X) then after doing the above you should also right-click the |app| icon on the tool bar, select Library Maintenance and run the Check Library action. It will warn you about any problems in your library, which you should fix by hand.
.. note:: A |app| library is just a folder which contains all the book files and their metadata. All the metadata is stored in a single file called metadata.db, in the top level folder. If this file gets corrupted, you may see an empty list of books in |app|. In this case you can ask |app| to restore your books by doing a right-click on the |app| icon in the toolbar and selecting Library Maintenance->Restore Library.
@ -653,7 +663,7 @@ Post any output you see in a help message on the `Forum <http://www.mobileread.c
|app| freezes/crashes occasionally?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are three possible things I know of, that can cause this:
There are five possible things I know of, that can cause this:
* You recently connected an external monitor or TV to your computer. In
this case, whenever |app| opens a new window like the edit metadata
@ -661,7 +671,7 @@ There are three possible things I know of, that can cause this:
you dont notice it and so you think |app| has frozen. Disconnect your
second monitor and restart calibre.
* You are using a Wacom branded mouse. There is an incompatibility between
* You are using a Wacom branded USB mouse. There is an incompatibility between
Wacom mice and the graphics toolkit |app| uses. Try using a non-Wacom
mouse.
@ -672,8 +682,11 @@ There are three possible things I know of, that can cause this:
* The Logitech SetPoint Settings application causes random crashes in
|app| when it is open. Close it before starting |app|.
* Constant Guard Protection by Xfinity causes crashes in |app|. You have to
manually allow |app| in it or uninstall Constant Guard Protection.
If none of the above apply to you, then there is some other program on your
computer that is interfering with |app|. First reboot your computer is safe
computer that is interfering with |app|. First reboot your computer in safe
mode, to have as few running programs as possible, and see if the crashes still
happen. If they do not, then you know it is some program causing the problem.
The most likely such culprit is a program that modifies other programs'
@ -784,7 +797,7 @@ Why doesn't |app| have an automatic update?
For many reasons:
* *There is no need to update every week*. If you are happy with how |app| works turn off the update notification and be on your merry way. Check back to see if you want to update once a year or so.
* Pre downloading the updates for all users in the background would mean require about 80TB of bandwidth *every week*. That costs thousands of dollars a month. And |app| is currently growing at 300,000 new users every month.
* Pre downloading the updates for all users in the background would require about 80TB of bandwidth *every week*. That costs thousands of dollars a month. And |app| is currently growing at 300,000 new users every month.
* If I implement a dialog that downloads the update and launches it, instead of going to the website as it does now, that would save the most ardent |app| updater, *at most five clicks a week*. There are far higher priority things to do in |app| development.
* If you really, really hate downloading |app| every week but still want to be up to the latest, I encourage you to run from source, which makes updating trivial. Instructions are :ref:`available here <develop>`.

View File

@ -42,7 +42,7 @@ class Ambito_Financiero(BasicNewsRecipe):
remove_attributes = ['align']
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.INDEX)
if self.username is not None and self.password is not None:
br.open(self.LOGIN)

View File

@ -37,7 +37,7 @@ class AppleDaily(BasicNewsRecipe):
#def get_browser(self):
#br = BasicNewsRecipe.get_browser()
#br = BasicNewsRecipe.get_browser(self)
#if self.username is not None and self.password is not None:
# br.open('http://www.nytimes.com/auth/login')
# br.select_form(name='login')

View File

@ -22,7 +22,7 @@ class Archeowiesci(BasicNewsRecipe):
return feeds
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://archeowiesci.pl/wp-login.php')
br.select_form(name='loginform')

View File

@ -31,7 +31,7 @@ class Azstarnet(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://azstarnet.com/')
if self.username is not None and self.password is not None:
data = urllib.urlencode({ 'm':'login'

View File

@ -19,6 +19,7 @@ class BaltimoreSun(BasicNewsRecipe):
use_embedded_content = False
no_stylesheets = True
remove_javascript = True
#auto_cleanup = True
recursions = 1
ignore_duplicate_articles = {'title'}
@ -78,6 +79,7 @@ class BaltimoreSun(BasicNewsRecipe):
#(u'High School', u'http://www.baltimoresun.com/sports/high-school/rss2.0.xml'),
#(u'Outdoors', u'http://www.baltimoresun.com/sports/outdoors/rss2.0.xml'),
## Entertainment ##
(u'Celebrity News', u'http://www.baltimoresun.com/entertainment/celebrities/rss2.0.xml'),
(u'Arts & Theater', u'http://www.baltimoresun.com/entertainment/arts/rss2.0.xml'),
@ -142,12 +144,12 @@ class BaltimoreSun(BasicNewsRecipe):
(u'Read Street', u'http://www.baltimoresun.com/features/books/read-street/rss2.0.xml'),
(u'Z on TV', u'http://www.baltimoresun.com/entertainment/tv/z-on-tv-blog/rss2.0.xml'),
## Life Blogs ##
(u'BMore Green', u'http://weblogs.baltimoresun.com/features/green/index.xml'),
(u'Baltimore Insider',u'http://www.baltimoresun.com/features/baltimore-insider-blog/rss2.0.xml'),
(u'Homefront', u'http://www.baltimoresun.com/features/parenting/homefront/rss2.0.xml'),
(u'Picture of Health', u'http://www.baltimoresun.com/health/blog/rss2.0.xml'),
(u'Unleashed', u'http://weblogs.baltimoresun.com/features/mutts/blog/index.xml'),
### Life Blogs ##
#(u'BMore Green', u'http://weblogs.baltimoresun.com/features/green/index.xml'),
#(u'Baltimore Insider',u'http://www.baltimoresun.com/features/baltimore-insider-blog/rss2.0.xml'),
#(u'Homefront', u'http://www.baltimoresun.com/features/parenting/homefront/rss2.0.xml'),
#(u'Picture of Health', u'http://www.baltimoresun.com/health/blog/rss2.0.xml'),
#(u'Unleashed', u'http://weblogs.baltimoresun.com/features/mutts/blog/index.xml'),
## b the site blogs ##
(u'Game Cache', u'http://www.baltimoresun.com/entertainment/bthesite/game-cache/rss2.0.xml'),
@ -167,6 +169,7 @@ class BaltimoreSun(BasicNewsRecipe):
]
def get_article_url(self, article):
ans = None
try:

View File

@ -28,6 +28,8 @@ class Barrons(BasicNewsRecipe):
## Don't grab articles more than 7 days old
oldest_article = 7
use_javascript_to_login = True
requires_version = (0, 9, 16)
extra_css = '''
.datestamp{font-family:Verdana,Geneva,Kalimati,sans-serif; font-size:x-small;}
@ -40,7 +42,7 @@ class Barrons(BasicNewsRecipe):
.insettipUnit{font-size: x-small;}
'''
remove_tags = [
dict(name ='div', attrs={'class':['tabContainer artTabbedNav','rssToolBox hidden','articleToolbox']}),
dict(name ='div', attrs={'class':['sTools sTools-t', 'tabContainer artTabbedNav','rssToolBox hidden','articleToolbox']}),
dict(name = 'a', attrs ={'class':'insetClose'})
]
@ -60,21 +62,17 @@ class Barrons(BasicNewsRecipe):
]
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('http://commerce.barrons.com/auth/login')
br.select_form(name='login_form')
br['user'] = self.username
br['password'] = self.password
br.submit()
return br
def javascript_login(self, br, username, password):
br.visit('http://commerce.barrons.com/auth/login')
f = br.select_form(nr=0)
f['username'] = username
f['password'] = password
br.submit(timeout=120)
## Use the print version of a page when available.
def print_version(self, url):
main, sep, rest = url.rpartition('?')
return main + '#printmode'
return main + '#text.print'
def postprocess_html(self, soup, first):

View File

@ -25,7 +25,7 @@ class BigOven(BasicNewsRecipe):
}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.bigoven.com/account/login?ReturnUrl=/')
br.select_form(nr=1)

View File

@ -14,7 +14,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
remove_empty_feeds = True
remove_javascript = True
no_stylesheets = True
#auto_cleanup = True
auto_cleanup = True
language = 'en_GB'
cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/161987_9010212100_2035706408_n.jpg'
@ -23,7 +23,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
def get_cover_url(self):
soup = self.index_to_soup('http://www.birminghampost.net')
# look for the block containing the sun button and url
cov = soup.find(attrs={'height' : re.compile('3'), 'alt' : re.compile('Birmingham Post')})
cov = soup.find(attrs={'height' : re.compile('3'), 'alt' : re.compile('Post')})
print
print '%%%%%%%%%%%%%%%',cov
print
@ -43,20 +43,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
return cover_url
keep_only_tags = [
dict(attrs={'id' : 'article-header'}),
#dict(name='h1',attrs={'id' : 'article-header'}),
dict(attrs={'class':['article-meta-author','article-meta-date','article main','art-o art-align-center otm-1 ']}),
dict(name='div',attrs={'class' : 'article-image full'}),
dict(attrs={'clas' : 'art-o art-align-center otm-1 '}),
dict(name='div',attrs={'class' : 'article main'}),
#dict(name='p')
#dict(attrs={'id' : 'three-col'})
]
remove_tags = [
# dict(name='div',attrs={'class' : 'span-33 last header-links'})
]
feeds = [
#(u'News',u'http://www.birminghampost.net/news/rss.xml'),
(u'West Mids. News', u'http://www.birminghampost.net/news/west-midlands-news/rss.xml'),
@ -65,9 +52,3 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
(u'Bloggs & Comments',u'http://www.birminghampost.net/comment/rss.xml')
]
extra_css = '''
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;text-align:center;}
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
'''

View File

@ -40,7 +40,7 @@ class Brecha(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://www.brecha.com.uy/index.php/acceder-miembros')
if self.username is not None and self.password is not None:
data = urllib.urlencode({ 'task':'login'

View File

@ -38,7 +38,7 @@ class BusinessWeekMagazine(BasicNewsRecipe):
title=self.tag_to_string(div.a).strip()
url=div.a['href']
soup0 = self.index_to_soup(url)
urlprint=soup0.find('li', attrs={'class':'print'}).a['href']
urlprint=soup0.find('li', attrs={'class':'print tracked'}).a['href']
articles.append({'title':title, 'url':urlprint, 'description':'', 'date':''})
@ -55,7 +55,7 @@ class BusinessWeekMagazine(BasicNewsRecipe):
title=self.tag_to_string(div.a).strip()
url=div.a['href']
soup0 = self.index_to_soup(url)
urlprint=soup0.find('li', attrs={'class':'print'}).a['href']
urlprint=soup0.find('li', attrs={'class':'print tracked'}).a['href']
articles.append({'title':title, 'url':urlprint, 'description':desc, 'date':''})
if articles:

View File

@ -17,7 +17,7 @@ class AdvancedUserRecipe1286242553(BasicNewsRecipe):
cover_url_pattern = 'http://cacm.acm.org/magazines/%d/%d'
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://cacm.acm.org/login')
br.select_form(nr=1)

View File

@ -34,7 +34,7 @@ class Caijing(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://service.caijing.com.cn/usermanage/login')
br.select_form(name='mainLoginForm')

View File

@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe):
def get_cover_url(self):
from datetime import timedelta, date
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
daysback=1
try:
br.open(cover)
except:
while daysback<7:
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -23,7 +23,7 @@ class Chronicle(BasicNewsRecipe):
needs_subscription = True
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://chronicle.com/myaccount/login')
br.select_form(nr=1)

View File

@ -73,7 +73,7 @@ class CNN(BasicNewsRecipe):
def get_masthead_url(self):
masthead = 'http://i.cdn.turner.com/cnn/.element/img/3.0/global/header/intl/hdr-globe-central.gif'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(masthead)
except:

0
recipes/conowego_pl.recipe Executable file → Normal file
View File

View File

@ -0,0 +1,35 @@
__license__ = 'GPL v3'
__copyright__ = '2013, Darko Miletic <darko.miletic at gmail.com>'
'''
contemporaryargentinewriters.wordpress.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class contemporaryargentinewriters(BasicNewsRecipe):
title = 'Contemporary Argentine Writers'
__author__ = 'Darko Miletic'
description = 'Short stories by Argentine writers (and others) translated into English'
publisher = 'Dario Bard'
category = 'fiction, literature, Argentina, english'
oldest_article = 25
max_articles_per_feed = 200
no_stylesheets = True
encoding = 'utf8'
use_embedded_content = True
language = 'en_AR'
remove_empty_feeds = True
publication_type = 'blog'
extra_css = """
body{font-family: Arial,Helvetica,sans-serif }
img{margin-bottom: 0.4em; display:block}
"""
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
}
feeds = [(u'Posts', u'http://contemporaryargentinewriters.wordpress.com/feed/')]

View File

@ -62,7 +62,7 @@ class ilCorriere(BasicNewsRecipe):
day = "%.2d" % st.tm_mday
#http://images.corriere.it/primapagina/storico/2010_05_17/images/prima_pagina_grande.png
cover='http://images.corriere.it/primapagina/storico/'+ year + '_' + month +'_' + day +'/images/prima_pagina_grande.png'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -40,7 +40,7 @@ class BHDani(BasicNewsRecipe):
remove_attributes = ['height','width','align']
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.INDEX)
br.select_form(name='form')

View File

@ -42,7 +42,7 @@ class DerSpiegel(BasicNewsRecipe):
else:
return True
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.PREFIX + '/meinspiegel/login.html')
br.select_form(predicate=has_login_name)

View File

@ -0,0 +1,46 @@
__license__ = 'GPL v3'
__copyright__ = '2013, Darko Miletic <darko.miletic at gmail.com>'
'''
dobanevinosti.blogspot.com
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
class DobaNevinosti(BasicNewsRecipe):
title = 'Doba Nevinosti'
__author__ = 'Darko Miletic'
description = 'Filmski blog'
oldest_article = 15
max_articles_per_feed = 100
language = 'sr'
encoding = 'utf-8'
no_stylesheets = True
use_embedded_content = True
publication_type = 'blog'
auto_cleanup = True
extra_css = """
@font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
body{font-family: "Trebuchet MS",Trebuchet,Verdana,sans1,sans-serif}
img{margin-bottom: 0.8em; display:block;}
"""
conversion_options = {
'comment' : description
, 'tags' : 'film, blog, srbija, tv'
, 'publisher': 'Dimitrije Vojinov'
, 'language' : language
}
remove_attributes = ['lang', 'border']
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
feeds = [(u'Tekstovi', u'http://dobanevinosti.blogspot.com/feeds/posts/default')]
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
for item in soup.findAll('img'):
if not item.has_key('alt'):
item['alt'] = 'image'
return soup

View File

@ -116,7 +116,7 @@ class DziennikPolski24(BasicNewsRecipe):
loop=True
def get_browser(self):
br=BasicNewsRecipe.get_browser()
br=BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.dziennikpolski24.pl/pl/moje-konto/950606-loguj.html')
br.select_form(nr = 1)

View File

@ -41,10 +41,11 @@ class Economist(BasicNewsRecipe):
remove_tags = [
dict(name=['script', 'noscript', 'title', 'iframe', 'cf_floatingcontent']),
dict(attrs={'class':['dblClkTrk', 'ec-article-info',
'share_inline_header', 'related-items']}),
'share_inline_header', 'related-items',
'main-content-container']}),
{'class': lambda x: x and 'share-links-header' in x},
]
keep_only_tags = [dict(id='ec-article-body')]
keep_only_tags = [dict(name='article')]
no_stylesheets = True
preprocess_regexps = [(re.compile('</html>.*', re.DOTALL),
lambda x:'</html>')]
@ -56,7 +57,7 @@ class Economist(BasicNewsRecipe):
needs_subscription = False
'''
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username and self.password:
br.open('http://www.economist.com/user/login')
br.select_form(nr=1)

View File

@ -41,10 +41,11 @@ class Economist(BasicNewsRecipe):
remove_tags = [
dict(name=['script', 'noscript', 'title', 'iframe', 'cf_floatingcontent']),
dict(attrs={'class':['dblClkTrk', 'ec-article-info',
'share_inline_header', 'related-items']}),
'share_inline_header', 'related-items',
'main-content-container']}),
{'class': lambda x: x and 'share-links-header' in x},
]
keep_only_tags = [dict(id='ec-article-body')]
keep_only_tags = [dict(name='article')]
no_stylesheets = True
preprocess_regexps = [(re.compile('</html>.*', re.DOTALL),
lambda x:'</html>')]
@ -56,7 +57,7 @@ class Economist(BasicNewsRecipe):
needs_subscription = False
'''
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username and self.password:
br.open('http://www.economist.com/user/login')
br.select_form(nr=1)

View File

@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe):
def get_cover_url(self):
from datetime import timedelta, date
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
daysback=1
try:
br.open(cover)
except:
while daysback<7:
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -73,7 +73,7 @@ class heraldo(BasicNewsRecipe):
#[url]http://info.elcorreo.com/pdf/06012011-viz.pdf[/url]
cover='http://info.elcorreo.com/pdf/'+ day + month + year +'-viz.pdf'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -44,7 +44,7 @@ class ElDiplo_Recipe(BasicNewsRecipe):
img.save(tmp_cover.name)
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.eldiplo.org/index.php/login/-/do_login/index.html')
br.select_form(nr=3)

View File

@ -3,29 +3,34 @@ from calibre.web.feeds.news import BasicNewsRecipe
class ElMundoTodayRecipe(BasicNewsRecipe):
title = 'El Mundo Today'
__author__ = 'atordo'
description = u'La actualidad del mañana'
description = u'La actualidad del ma\u00f1ana'
category = 'Noticias, humor'
cover_url = 'http://www.elmundotoday.com/wp-content/themes/EarthlyTouch/images/logo.png'
oldest_article = 30
oldest_article = 15
max_articles_per_feed = 60
auto_cleanup = False
no_stylesheets = True
remove_javascript = True
language = 'es'
use_embedded_content = False
publication_type = 'blog'
preprocess_regexps = [
(re.compile(r'</title>.*<!--Begin Article Single-->', re.DOTALL),
lambda match: '</title><body>'),
#(re.compile(r'^\t{5}<a href.*Permanent Link to ">$'), lambda match: ''),
#(re.compile(r'\t{5}</a>$'), lambda match: ''),
(re.compile(r'<div class="social4i".*</body>', re.DOTALL),
lambda match: '</body>'),
lambda match: '</title></head><body>'),
(re.compile(r'<img alt="" src="http://www.elmundotoday.com/wp-content/themes/emt/images/otrassecciones-line.gif">'),
lambda match: ''),
(re.compile(r'<div style="clear: both;"></div>.*</body>', re.DOTALL),
lambda match: '</body>')
]
keep_only_tags = [
dict(name='div', attrs={'class':'post-wrapper'})
dict(name='div', attrs={'class':'post-wrapper '})
]
remove_tags = [
dict(name='div', attrs={'class':'social4i'}),
dict(name='span', attrs={'class':'num-comentarios'})
]
remove_attributes = [ 'href', 'title', 'alt' ]
@ -36,8 +41,3 @@ class ElMundoTodayRecipe(BasicNewsRecipe):
'''
feeds = [('El Mundo Today', 'http://www.elmundotoday.com/feed/')]
def get_broser(self):
br = BasicNewsRecipe.get_browser(self)
br.set_handle_gzip(True)
return br

View File

@ -26,7 +26,7 @@ class elet_es_irodalom(BasicNewsRecipe):
#Nem ide a kódba kell beleírni a hozzáférés adatait, hanem azt akkor adod meg, ha le akarod tölteni!
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.es.hu/')
br.select_form(name='userfrmlogin')

View File

@ -116,7 +116,7 @@ class ElMundo(BasicNewsRecipe):
day = "%.2d" % st.tm_mday
#http://img.kiosko.net/2011/11/19/es/elmundo.750.jpg
cover='http://img.kiosko.net/'+ year + '/' + month + '/' + day +'/es/elmundo.750.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -76,7 +76,7 @@ class ESPN(BasicNewsRecipe):
return soup
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username and self.password:
br.set_handle_refresh(False)
url = ('https://r.espn.go.com/members/v3_1/login')

View File

@ -89,7 +89,7 @@ class expansion_spanish(BasicNewsRecipe):
day = "%.2d" % st.tm_mday
#[url]http://img5.kiosko.net/2011/11/14/es/expansion.750.jpg[/url]
cover='http://img5.kiosko.net/'+ year + '/' + month + '/' + day +'/es/expansion.750.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -34,7 +34,7 @@ class FinancialTimes_rss(BasicNewsRecipe):
}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.INDEX)
if self.username is not None and self.password is not None:
br.open(self.LOGIN)

View File

@ -40,7 +40,7 @@ class FinancialTimes(BasicNewsRecipe):
}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.INDEX)
if self.username is not None and self.password is not None:
br.open(self.LOGIN2)

View File

@ -14,26 +14,17 @@ class AdvancedUserRecipe1313693926(BasicNewsRecipe):
language = 'de'
encoding = 'UTF-8'
__author__ = 'Armin Geller' # 2011-08-19
__author__ = 'Armin Geller' # 2013-02-05 V3
oldest_article = 7
max_articles_per_feed = 50
remove_tags = [
dict(name='div', attrs={'id':["comments"]}),
dict(attrs={'class':['commentlink']}),
]
keep_only_tags = [
dict(name='div', attrs={'class':["grid_8 articleText"]}),
dict(name='div', attrs={'class':["articleTextInnerText"]}),
]
feeds = [
(u'Inhalt:', u'http://www.fluter.de/de/?tpl=907'),
]
extra_css = '.cs_img {margin-right: 10pt;}'
def print_version(self, url):
return url + '?tpl=1260'

View File

@ -40,7 +40,7 @@ class FSP(BasicNewsRecipe):
re.DOTALL|re.IGNORECASE), lambda match: r'')]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://acesso.uol.com.br/login.html')
br.form = br.forms().next()

View File

@ -132,7 +132,7 @@ class ForeignAffairsRecipe(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://www.foreignaffairs.com/user?destination=user%3Fop%3Dlo')
br.select_form(nr = 1)

View File

@ -21,6 +21,10 @@ class AdvancedUserRecipe1287083651(BasicNewsRecipe):
encoding = 'utf8'
publisher = 'Globe & Mail'
language = 'en_CA'
use_embedded_content = False
no_stylesheets = True
auto_cleanup = True
extra_css = 'p.meta {font-size:75%}\n .redtext {color: red;}\n .byline {font-size: 70%}'
feeds = [
@ -44,12 +48,12 @@ class AdvancedUserRecipe1287083651(BasicNewsRecipe):
(re.compile(r'<script.*?</script>', re.DOTALL), lambda m: ''),
]
remove_tags_before = dict(name='h1')
remove_tags = [
dict(name='div', attrs={'id':['ShareArticles', 'topStories']}),
dict(href=lambda x: x and 'tracking=' in x),
{'class':['articleTools', 'pagination', 'Ads', 'topad',
'breadcrumbs', 'footerNav', 'footerUtil', 'downloadlinks']}]
#remove_tags_before = dict(name='h1')
#remove_tags = [
#dict(name='div', attrs={'id':['ShareArticles', 'topStories']}),
#dict(href=lambda x: x and 'tracking=' in x),
#{'class':['articleTools', 'pagination', 'Ads', 'topad',
#'breadcrumbs', 'footerNav', 'footerUtil', 'downloadlinks']}]
def populate_article_metadata(self, article, soup, first):
if first and hasattr(self, 'add_toc_thumbnail'):

View File

@ -65,7 +65,7 @@ class Haaretz_en(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.PREFIX)
if self.username is not None and self.password is not None:
data = urllib.urlencode({ 'cb':'parseEngReply'

View File

@ -51,7 +51,7 @@ class Harpers_full(BasicNewsRecipe):
remove_attributes=['xmlns']
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://harpers.org/')
if self.username is not None and self.password is not None:
tt = time.localtime()*1000

View File

@ -11,11 +11,11 @@ class HBR(BasicNewsRecipe):
timefmt = ' [%B %Y]'
language = 'en'
no_stylesheets = True
recipe_disabled = ('hbr.org has started requiring the use of javascript'
' to log into their website. This is unsupported in calibre, so'
' this recipe has been disabled. If you would like to see '
' HBR supported in calibre, contact hbr.org and ask them'
' to provide a javascript free login method.')
# recipe_disabled = ('hbr.org has started requiring the use of javascript'
# ' to log into their website. This is unsupported in calibre, so'
# ' this recipe has been disabled. If you would like to see '
# ' HBR supported in calibre, contact hbr.org and ask them'
# ' to provide a javascript free login method.')
LOGIN_URL = 'https://hbr.org/login?request_url=/'
LOGOUT_URL = 'https://hbr.org/logout?request_url=/'
@ -38,46 +38,38 @@ class HBR(BasicNewsRecipe):
#articleAuthors{font-family:Georgia,"Times New Roman",Times,serif; font-style:italic; color:#000000;font-size:x-small;}
#summaryText{font-family:Georgia,"Times New Roman",Times,serif; font-weight:bold; font-size:x-small;}
'''
use_javascript_to_login = True
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
self.logout_url = None
#'''
br.open(self.LOGIN_URL)
br.select_form(name='signin-form')
br['signin-form:username'] = self.username
br['signin-form:password'] = self.password
raw = br.submit().read()
if '>Sign out<' not in raw:
raise Exception('Failed to login, are you sure your username and password are correct?')
def javascript_login(self, br, username, password):
from calibre.web.jsbrowser.browser import Timeout
try:
link = br.find_link(text='Sign out')
if link:
self.logout_url = link.absolute_url
except:
self.logout_url = self.LOGOUT_URL
#'''
return br
def cleanup(self):
if self.logout_url is not None:
self.browser.open(self.logout_url)
br.visit('https://hbr.org/login?request_url=/', timeout=20)
except Timeout:
pass
br.click('#accordion div[tabindex="0"]', wait_for_load=False)
f = br.select_form('#signin-form')
f['signin-form:username'] = username
f['signin-form:password'] = password
br.submit(wait_for_load=False)
br.run_for_a_time(30)
def map_url(self, url):
if url.endswith('/ar/1'):
return url[:-1]+'pr'
def hbr_get_toc(self):
#return self.index_to_soup(open('/t/hbr.html').read())
# return self.index_to_soup(open('/t/toc.html').read())
today = date.today()
future = today + timedelta(days=30)
for x in [x.strftime('%y%m') for x in (future, today)]:
past = today - timedelta(days=30)
for x in [x.strftime('%y%m') for x in (future, today, past)]:
url = self.INDEX + x
soup = self.index_to_soup(url)
if not soup.find(text='Issue Not Found'):
if (not soup.find(text='Issue Not Found') and not soup.find(
text="We're Sorry. There was an error processing your request")
and 'Exception: java.io.FileNotFoundException' not in
unicode(soup)):
return soup
raise Exception('Could not find current issue')
@ -85,8 +77,9 @@ class HBR(BasicNewsRecipe):
feeds = []
current_section = None
articles = []
for x in soup.find(id='archiveToc').findAll(['h3', 'h4']):
if x.name == 'h3':
for x in soup.find(id='issueFeaturesContent').findAll(['li', 'h4']):
if x.name == 'h4':
if x.get('class', None) == 'basic':continue
if current_section is not None and articles:
feeds.append((current_section, articles))
current_section = self.tag_to_string(x).capitalize()
@ -102,7 +95,7 @@ class HBR(BasicNewsRecipe):
if url.startswith('/'):
url = 'http://hbr.org' + url
url = self.map_url(url)
p = x.parent.find('p')
p = x.find('p', attrs={'class':'author'})
desc = ''
if p is not None:
desc = self.tag_to_string(p)
@ -114,10 +107,9 @@ class HBR(BasicNewsRecipe):
'date':''})
return feeds
def parse_index(self):
soup = self.hbr_get_toc()
#open('/t/hbr.html', 'wb').write(unicode(soup).encode('utf-8'))
# open('/t/hbr.html', 'wb').write(unicode(soup).encode('utf-8'))
feeds = self.hbr_parse_toc(soup)
return feeds

View File

@ -53,7 +53,7 @@ class heraldo(BasicNewsRecipe):
day = "%.2d" % st.tm_mday
#[url]http://oldorigin-www.heraldo.es/20101211/primeras/portada_aragon.pdf[/url]
cover='http://oldorigin-www.heraldo.es/'+ year + month + day +'/primeras/portada_aragon.pdf'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -21,7 +21,7 @@ class HistoryToday(BasicNewsRecipe):
needs_subscription = True
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.historytoday.com/user/login')
br.select_form(nr=1)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 605 B

View File

@ -44,7 +44,7 @@ class IlMessaggero(BasicNewsRecipe):
month = "%.2d" % st.tm_mon
day = "%.2d" % st.tm_mday
cover='http://carta.ilmessaggero.it/' + year + month + day + '/jpeg/MSGR_20_CITTA_1.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -21,7 +21,7 @@ class insider(BasicNewsRecipe):
needs_subscription = True
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://www.denikinsider.cz/')
br.select_form(nr=0)
br['login-name'] = self.username

View File

@ -37,7 +37,7 @@ class AdvancedUserRecipe1299694372(BasicNewsRecipe):
add_title_tag = False;
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None:
br.open(self.LOGIN)
br.select_form(nr=0)

View File

@ -1,5 +1,5 @@
__license__ = 'GPL v3'
__copyright__ = '2008-2011, Darko Miletic <darko.miletic at gmail.com>'
__copyright__ = '2008-2013, Darko Miletic <darko.miletic at gmail.com>'
'''
japantimes.co.jp
'''
@ -13,59 +13,41 @@ class JapanTimes(BasicNewsRecipe):
language = 'en_JP'
category = 'news, politics, japan'
publisher = 'The Japan Times'
oldest_article = 5
oldest_article = 2
max_articles_per_feed = 150
no_stylesheets = True
use_embedded_content = False
encoding = 'utf8'
publication_type = 'newspaper'
masthead_url = 'http://search.japantimes.co.jp/images/header_title.gif'
masthead_url = 'http://www.japantimes.co.jp/wp-content/themes/jt_theme/library/img/logo-japan-times.png'
extra_css = 'body{font-family: Geneva,Arial,Helvetica,sans-serif}'
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
, 'linearize_tables' : True
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
}
keep_only_tags = [dict(name='div', attrs={'id':'printresult'})]
remove_tags = [
dict(name=['iframe','meta','link','embed','object','base'])
,dict(attrs={'id':'searchfooter'})
]
feeds = [(u'The Japan Times', u'http://feeds.feedburner.com/japantimes')]
remove_attributes = ['border']
remove_tags_after = dict(name='div', attrs={'class':'entry'})
keep_only_tags = [dict(name='div', attrs={'class':'padding_block'})]
remove_tags = [
dict(name=['iframe','embed','object','base'])
,dict(attrs={'class':['meta_extras','related_articles']})
,dict(attrs={'id':'content_footer_menu'})
]
feeds = [
(u'News' , u'http://www.japantimes.co.jp/news/feed/' )
,(u'Opinion' , u'http://www.japantimes.co.jp/opinion/feed/' )
,(u'Life' , u'http://www.japantimes.co.jp/opinion/feed/' )
,(u'Community', u'http://www.japantimes.co.jp/community/feed/')
,(u'Culture' , u'http://www.japantimes.co.jp/culture/feed/' )
,(u'Sports' , u'http://www.japantimes.co.jp/sports/feed/' )
]
def get_article_url(self, article):
rurl = BasicNewsRecipe.get_article_url(self, article)
return rurl.partition('?')[0]
def print_version(self, url):
if '/rss/' in url:
return url.replace('.jp/rss/','.jp/print/')
if '/text/' in url:
return url.replace('.jp/text/','.jp/print/')
return url
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
for item in soup.findAll('img'):
if not item.has_key('alt'):
item['alt'] = 'image'
for item in soup.findAll('photo'):
item.name = 'div'
for item in soup.head.findAll('paragraph'):
item.extract()
for item in soup.findAll('wwfilename'):
item.extract()
for item in soup.findAll('jtcategory'):
item.extract()
for item in soup.findAll('nomooter'):
item.extract()
for item in soup.body.findAll('paragraph'):
item.name = 'p'
return soup
def preprocess_raw_html(self, raw, url):
return '<html><head>'+raw[raw.find('</head>'):]

View File

@ -25,7 +25,7 @@ class JBPress(BasicNewsRecipe):
<input id="rememberme" name="rememberme" type="checkbox"/>
</form>
'''
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://jbpress.ismedia.jp/articles/print/5549')
response = br.response()

View File

@ -17,7 +17,7 @@ class JournalofHospitalMedicine(BasicNewsRecipe):
# TO LOGIN
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://www3.interscience.wiley.com/cgi-bin/home')
br.select_form(nr=0)
br['j_username'] = self.username

View File

@ -31,7 +31,7 @@ class JASN(BasicNewsRecipe):
#TO LOGIN
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
self.kidney_toc_soup = BeautifulSoup(br.open(self.INDEX).read())
toc = self.kidney_toc_soup.find(id='tocTable')
t = toc.find(text=lambda x: x and '[Full&nbsp;Text]' in x)

View File

@ -29,7 +29,7 @@ class AdvancedUserRecipe1299694372(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None:
br.open(self.LOGIN)
br.select_form(nr=0)

View File

@ -11,7 +11,7 @@ class BasicUserRecipe1318619728(BasicNewsRecipe):
def get_masthead_url(self):
masthead = 'http://korben.info/wp-content/themes/korben-steaw/hab/logo.png'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(masthead)
except:

View File

@ -0,0 +1,40 @@
from calibre.web.feeds.news import BasicNewsRecipe
class crnews(BasicNewsRecipe):
__author__ = 'Douglas Delgado'
title = u'La Nacion'
publisher = 'GRUPO NACION GN, S. A.'
description = 'Diario de circulacion nacional de Costa Rica. Recipe creado por Douglas Delgado (doudelgado@gmail.com) para su uso con Calibre por Kovid Goyal'
category = 'Spanish, Entertainment'
masthead_url = 'http://www.nacion.com/App_Themes/nacioncom/Images/logo_nacioncom.png'
oldest_article = 7
delay = 1
max_articles_per_feed = 100
auto_cleanup = True
encoding = 'utf-8'
language = 'es_CR'
use_embedded_content = False
remove_empty_feeds = True
remove_javascript = True
no_stylesheets = True
feeds = [(u'Portada', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=portada'), (u'Ultima Hora', u'http://www.nacion.com/Generales/RSS/UltimaHoraRss.aspx'), (u'Nacionales', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=elpais'), (u'Entretenimiento', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=entretenimiento'), (u'Sucesos', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=sucesos'), (u'Deportes', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=deportes'), (u'Internacionales', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=mundo'), (u'Economia', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=economia'), (u'Aldea Global', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=aldeaglobal'), (u'Tecnologia', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=tecnologia'), (u'Opinion', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=opinion')]
def get_cover_url(self):
index = 'http://kiosko.net/cr/np/cr_nacion.html'
soup = self.index_to_soup(index)
for image in soup.findAll('img',src=True):
if image['src'].endswith('cr_nacion.750.jpg'):
return image['src']
return None
def get_article_url(self, article):
url = article.get('guid', None)
return url
extra_css = '''
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:30px;}
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal; font-style:italic; font-size:18px;}
'''

View File

@ -1,15 +1,16 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2012, Rémi Vanicat <vanicat at debian.org>'
__copyright__ = '2012, 2013, Rémi Vanicat <vanicat at debian.org>'
'''
Lemonde.fr: Version abonnée
'''
import os, zipfile, re, time
from urllib2 import HTTPError
from calibre.constants import preferred_encoding
from calibre import strftime
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calibre.ptempfile import PersistentTemporaryFile
@ -20,34 +21,44 @@ class LeMondeAbonne(BasicNewsRecipe):
__author__ = u'Rémi Vanicat'
description = u'Actualités'
category = u'Actualités, France, Monde'
publisher = 'Le Monde'
language = 'fr'
needs_subscription = True
no_stylesheets = True
smarten_punctuation = True
remove_attributes = [ 'border', 'cellspacing', 'display', 'align', 'cellpadding', 'colspan', 'valign', 'vscape', 'hspace', 'alt', 'width', 'height']
extra_css = ''' li{margin:6pt 0}
ul{margin:0}
no_stylesheets = True
div.photo img{max-width:100%; border:0px transparent solid;}
div.photo{font-family:inherit; color:#333; text-align:center;}
div.photo p{text-align:justify;font-size:.9em; line-height:.9em;}
extra_css = u'''
h1{font-size:130%;}
.ariane{font-size:xx-small;}
.source{font-size:xx-small;}
.href{font-size:xx-small;}
.LM_caption{color:#666666; font-size:x-small;}
.main-article-info{font-family:Arial,Helvetica,sans-serif;}
#full-contents{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}
#match-stats-summary{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}
'''
@page{margin:10pt}
.ar-txt {color:#000; text-align:justify;}
h1{text-align:left; font-size:1.25em;}
.auteur{text-align:right; font-weight:bold}
.feed{text-align:right; font-weight:bold}
.po-ti2{font-weight:bold}
.fen-tt{font-weight:bold;font-size:1.1em}
'''
zipurl_format = 'http://medias.lemonde.fr/abonnes/editionelectronique/%Y%m%d/html/%y%m%d.zip'
coverurl_format = '/img/%y%m%d01.jpg'
path_format = "%y%m%d"
login_url = 'http://www.lemonde.fr/web/journal_electronique/identification/1,56-0,45-0,0.html'
keep_only_tags = [ dict(name="div", attrs={ 'class': 'po-prti' }), dict(name=['h1']), dict(name='div', attrs={ 'class': 'photo' }), dict(name='div', attrs={ 'class': 'po-ti2' }), dict(name='div', attrs={ 'class': 'ar-txt' }), dict(name='div', attrs={ 'class': 'po_rtcol' }) ]
keep_only_tags = [dict(name=['h1']), dict(name='div', attrs={ 'class': 'photo' }), dict(name='div', attrs={ 'class': 'po-ti2' }), dict(name='div', attrs={ 'class': 'ar-txt' }), dict(name='div', attrs={ 'class': 'po_rtcol' }) ]
remove_tags = [ dict(name='div', attrs={ 'class': 'po-ti' }),dict(name='div', attrs={ 'class': 'po-copy' })]
article_id_pattern = re.compile("[0-9]+\\.html")
article_url_format = 'http://www.lemonde.fr/journalelectronique/donnees/protege/%Y%m%d/html/'
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.login_url)
br.select_form(nr=0)
@ -67,12 +78,16 @@ class LeMondeAbonne(BasicNewsRecipe):
second = time.time()
second += self.decalage
ltime = self.ltime = time.gmtime(second)
url = time.strftime(self.zipurl_format, ltime)
self.timefmt=strftime(" %A %d %B %Y", ltime)
response = browser.open(url)
for i in range(7):
self.ltime = time.gmtime(second)
self.timefmt=time.strftime(" %A %d %B %Y",self.ltime).decode(preferred_encoding)
url = time.strftime(self.zipurl_format,self.ltime)
try:
response = browser.open(url)
continue
except HTTPError:
second -= 24*60*60
tmp = PersistentTemporaryFile(suffix='.zip')
self.report_progress(0.1,_('downloading zip file'))
@ -85,7 +100,7 @@ class LeMondeAbonne(BasicNewsRecipe):
zfile.extractall(self.output_dir)
zfile.close()
path = os.path.join(self.output_dir, time.strftime(self.path_format, ltime), "data")
path = os.path.join(self.output_dir, time.strftime(self.path_format, self.ltime), "data")
self.articles_path = path
@ -95,13 +110,33 @@ class LeMondeAbonne(BasicNewsRecipe):
flux = []
article_url = time.strftime(self.article_url_format, ltime)
article_url = time.strftime(self.article_url_format, self.ltime)
for i in range(nb_index_files):
filename = os.path.join(path, "selection_%d.html" % (i + 1))
tmp = open(filename,'r')
soup=BeautifulSoup(tmp)
soup=BeautifulSoup(tmp,convertEntities=BeautifulSoup.HTML_ENTITIES)
title=soup.find('span').contents[0]
if title=="Une":
title="À la une"
if title=="Evenement":
title="L'événement"
if title=="Planete":
title="Planète"
if title=="Economie - Entreprises":
title="Économie"
if title=="L'Oeil du Monde":
title="L'œil du Monde"
if title=="Enquete":
title="Enquête"
if title=="Editorial - Analyses":
title="Analyses"
if title=="Le Monde Economie":
title="Économie"
if title=="Le Monde Culture et idées":
title="Idées"
if title=="Le Monde Géo et politique":
title="Géopolitique"
tmp.close()
filename = os.path.join(path, "frame_gauche_%d.html" % (i + 1))
@ -114,7 +149,7 @@ class LeMondeAbonne(BasicNewsRecipe):
article = {
'title': link.contents[0],
'url': article_url + article_id,
'descripion': '',
'description': '',
'content': ''
}
articles.append(article)
@ -129,4 +164,3 @@ class LeMondeAbonne(BasicNewsRecipe):
# Local Variables:
# mode: python
# End:

View File

@ -88,7 +88,7 @@ class ledevoir(BasicNewsRecipe):
.texte {font-size:1.15em;line-height:1.4em;margin-bottom:17px;}
'''
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.ledevoir.com')
br.select_form(nr=0)

View File

@ -53,12 +53,12 @@ class LeggoIT(BasicNewsRecipe):
month = "%.2d" % st.tm_mon
day = "%.2d" % st.tm_mday
cover='http://www.leggo.it/'+ year + month + day + '/jpeg/LEGGO_ROMA_1.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:
cover='http://www.leggo.it/'+ year + month + day + '/jpeg/LEGGO_ROMA_3.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -42,7 +42,7 @@ class LeMondeDiplomatiqueEn(BasicNewsRecipe):
}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.LOGIN)
if self.username is not None and self.password is not None:
data = urllib.urlencode({ 'login':self.username

View File

@ -66,7 +66,7 @@ class lepoint(BasicNewsRecipe):
def get_masthead_url(self):
masthead = 'http://www.lepoint.fr/images/commun/logo.png'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(masthead)
except:

View File

@ -64,7 +64,7 @@ class lepoint(BasicNewsRecipe):
def get_masthead_url(self):
masthead = 'http://static.lexpress.fr/imgstat/logo_lexpress.gif'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(masthead)
except:

View File

@ -71,7 +71,7 @@ class Liberation(BasicNewsRecipe):
def get_masthead_url(self):
masthead = 'http://s0.libe.com/libe/img/common/logo-liberation-150.png'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(masthead)
except:

View File

@ -61,7 +61,7 @@ class Liberation(BasicNewsRecipe):
index = 'http://www.liberation.fr/abonnes/'
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.liberation.fr/jogger/login/')
br.select_form(nr=0)

View File

@ -0,0 +1,65 @@
__license__ = 'GPL v3'
__copyright__ = '2013, Darko Miletic <darko.miletic at gmail.com>'
'''
www.libertaddigital.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class LibertadDigital(BasicNewsRecipe):
title = 'Libertad Digital'
__author__ = 'Darko Miletic'
description = 'En Libertad Digital encontraras noticias y opinion sobre: España, el Mundo, Internet, sociedad, economia y deportes'
publisher = 'Libertad Digital S.A.'
category = 'noticias, ultima hora, españa, internet, mundo, economia, sociedad, Libertad Digital'
oldest_article = 2
max_articles_per_feed = 200
no_stylesheets = True
encoding = 'cp1252'
use_embedded_content = False
language = 'es'
remove_empty_feeds = True
publication_type = 'website'
masthead_url = 'http://s.libertaddigital.com/images/logo.gif'
extra_css = """
body{font-family: Verdana,sans-serif }
img{margin-bottom: 0.4em; display:block}
"""
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
}
remove_tags = [
dict(name=['meta','link','iframe','embed','object'])
,dict(name='p', attrs={'class':'copyright'})
]
remove_attributes=['lang']
feeds = [
(u'Portada' , u'http://feeds2.feedburner.com/libertaddigital/deportes' )
,(u'Opinion' , u'http://feeds2.feedburner.com/libertaddigital/opinion' )
,(u'España' , u'http://feeds2.feedburner.com/libertaddigital/nacional' )
,(u'Internacional', u'http://feeds2.feedburner.com/libertaddigital/internacional')
,(u'Libre Mercado', u'http://feeds2.feedburner.com/libertaddigital/economia' )
,(u'Chic' , u'http://feeds2.feedburner.com/libertaddigital/el-candelabro')
,(u'Internet' , u'http://feeds2.feedburner.com/libertaddigital/internet' )
,(u'Deportes' , u'http://feeds2.feedburner.com/libertaddigital/deportes' )
]
def get_article_url(self, article):
return article.get('guid', None)
def print_version(self, url):
art, sep, rest = url.rpartition('/')
aart, asep, artid = art.rpartition('-')
return 'http://www.libertaddigital.com/c.php?op=imprimir&id=' + artid
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
return soup

0
recipes/linux_journal.recipe Executable file → Normal file
View File

View File

@ -28,7 +28,7 @@ class LondonReviewOfBooksPayed(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.LOGIN)
br.select_form(nr=1)

View File

@ -23,7 +23,7 @@ class LWN(BasicNewsRecipe):
LOGIN = 'https://lwn.net/login'
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.LOGIN)
br.select_form(name='loginform')

View File

@ -43,7 +43,7 @@ class WeeklyLWN(BasicNewsRecipe):
needs_subscription = 'optional'
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://lwn.net/login')
br.select_form(name='loginform')

View File

@ -44,7 +44,7 @@ class Mediapart(BasicNewsRecipe):
# -- Handle login
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.mediapart.fr/')
br.select_form(nr=0)

View File

@ -38,7 +38,7 @@ class MedScrape(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://profreg.medscape.com/px/getlogin.do')
br.select_form(name='LoginForm')

View File

@ -8,13 +8,16 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
title = u'Metro UK'
description = 'News as provided by The Metro -UK'
#timefmt = ''
__author__ = 'Dave Asbury'
#last update 9/6/12
cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/276636_117118184990145_2132092232_n.jpg'
oldest_article = 1
__author__ = 'fleclerc & Dave Asbury'
#last update 20/1/13
#cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/276636_117118184990145_2132092232_n.jpg'
cover_url = 'https://twimg0-a.akamaihd.net/profile_images/1638332595/METRO_LETTERS-01.jpg'
remove_empty_feeds = True
remove_javascript = True
auto_cleanup = True
max_articles_per_feed = 12
ignore_duplicate_articles = {'title', 'url'}
encoding = 'UTF-8'
language = 'en_GB'

View File

@ -18,6 +18,8 @@ class MichelleMalkin(BasicNewsRecipe):
remove_javascript = True
no_stylesheets = True
auto_cleanup = True
use_embedded_content = False
conversion_options = {
@ -29,16 +31,16 @@ class MichelleMalkin(BasicNewsRecipe):
}
keep_only_tags = [
dict(name='div', attrs={'class':'article'})
]
#keep_only_tags = [
#dict(name='div', attrs={'class':'article'})
#]
remove_tags = [
dict(name=['iframe', 'embed', 'object']),
dict(name='div', attrs={'id':['comments', 'commentForm']}),
dict(name='div', attrs={'class':['postCategories', 'comments', 'blogInfo', 'postInfo']})
#remove_tags = [
#dict(name=['iframe', 'embed', 'object']),
#dict(name='div', attrs={'id':['comments', 'commentForm']}),
#dict(name='div', attrs={'class':['postCategories', 'comments', 'blogInfo', 'postInfo']})
]
#]
feeds = [(u'http://feeds.feedburner.com/michellemalkin/posts')]

View File

@ -252,7 +252,7 @@ class MPRecipe(BasicNewsRecipe):
cover = 'http://www.mingpaovan.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgva1s.jpg'
elif __Region__ == 'Toronto':
cover = 'http://www.mingpaotor.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgtas.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -229,7 +229,7 @@ class MPRecipe(BasicNewsRecipe):
cover = 'http://www.mingpaovan.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgva1s.jpg'
elif __Region__ == 'Toronto':
cover = 'http://www.mingpaotor.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgtas.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -229,7 +229,7 @@ class MPRecipe(BasicNewsRecipe):
cover = 'http://www.mingpaovan.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgva1s.jpg'
elif __Region__ == 'Toronto':
cover = 'http://www.mingpaotor.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgtas.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe):
def get_cover_url(self):
from datetime import timedelta, date
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
daysback=1
try:
br.open(cover)
except:
while daysback<7:
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

View File

@ -18,7 +18,7 @@ class NBOnline(BasicNewsRecipe):
return 'http://business.nikkeibp.co.jp/images/nbo/200804/parts/logo.gif'
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://signon.nikkeibp.co.jp/front/login/?ct=p&ts=nbo')
br.select_form(name='loginActionForm')

View File

@ -16,7 +16,7 @@ class NYTimes(BasicNewsRecipe):
#TO LOGIN
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://www.nejm.org/action/showLogin?uri=http://www.nejm.org/')
br.select_form(name='frmLogin')
br['login'] = self.username

View File

@ -68,7 +68,7 @@ class NewScientist(BasicNewsRecipe):
url_list = [] # This list is used to check if an article had already been included.
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://www.newscientist.com/')
if self.username is not None and self.password is not None:
br.open('https://www.newscientist.com/user/login')

View File

@ -31,7 +31,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
m:'<head></head>')]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open('http://www.nybooks.com/account/signin/')
br.select_form(nr = 1)
br['username'] = self.username

View File

@ -30,7 +30,7 @@ class NikkeiNet_paper_subscription(BasicNewsRecipe):
remove_tags_after = {'class':"cmn-indent"}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
#pp.pprint(self.parse_index())
#exit(1)

View File

@ -25,7 +25,7 @@ class NikkeiNet_subscription(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
cj = mechanize.LWPCookieJar()
br.set_cookiejar(cj)

View File

@ -44,7 +44,7 @@ class NikkeiNet_sub_economy(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
cj = mechanize.LWPCookieJar()
br.set_cookiejar(cj)

View File

@ -41,7 +41,7 @@ class NikkeiNet_sub_industory(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
cj = mechanize.LWPCookieJar()
br.set_cookiejar(cj)

View File

@ -38,7 +38,7 @@ class NikkeiNet_sub_life(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
cj = mechanize.LWPCookieJar()
br.set_cookiejar(cj)

View File

@ -37,7 +37,7 @@ class NikkeiNet_sub_main(BasicNewsRecipe):
feeds = [ (u'NIKKEI', u'http://www.zou3.net/php/rss/nikkei2rss.php?head=main')]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
cj = mechanize.LWPCookieJar()
br.set_cookiejar(cj)

View File

@ -36,7 +36,7 @@ class NikkeiNet_sub_shakai(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
cj = mechanize.LWPCookieJar()
br.set_cookiejar(cj)

View File

@ -42,7 +42,7 @@ class NikkeiNet_sub_sports(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
cj = mechanize.LWPCookieJar()
br.set_cookiejar(cj)

View File

@ -51,7 +51,7 @@ class Nin(BasicNewsRecipe):
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.INDEX)
br.select_form(name='form1')

View File

@ -53,7 +53,7 @@ class NoviList_hr(BasicNewsRecipe):
remove_attributes=['border', 'lang', 'size', 'face', 'bgcolor']
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(self.index + 'loginnow.asp')
br.select_form(nr=0)

View File

@ -47,7 +47,7 @@ class NoviStandard(BasicNewsRecipe):
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.INDEX)
if self.username is not None and self.password is not None:
br.select_form(name='login')

View File

@ -60,7 +60,7 @@ class Nowa_Fantastyka(BasicNewsRecipe):
return getattr(self, 'cover_url', self.cover_url)
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://www.fantastyka.pl/')
br.select_form(nr=0)

View File

@ -29,7 +29,7 @@ class NRCHandelsblad(BasicNewsRecipe):
}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('http://login.nrc.nl/login')
br.select_form(nr=0)

View File

@ -47,7 +47,7 @@ class NotSafeForWork(BasicNewsRecipe):
}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.LOGIN)
if self.username is not None and self.password is not None:
data = urllib.urlencode({ 'email':self.username

View File

@ -45,7 +45,7 @@ class Nspm(BasicNewsRecipe):
remove_attributes = ['width','height','lang','xmlns:fb','xmlns:og','vspace','hspace','type','start','size']
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.INDEX)
return br

View File

@ -30,7 +30,7 @@ class NursingTimes(BasicNewsRecipe):
}
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
br.open(self.LOGIN)
if self.username is not None and self.password is not None:
data = urllib.urlencode({ 'campaigncode' :'0'

View File

@ -358,20 +358,20 @@ class NYTimes(BasicNewsRecipe):
return fixed
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
return br
cover_tag = 'NY_NYT'
def get_cover_url(self):
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.cover_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
daysback=1
try:
br.open(cover)
except:
while daysback<7:
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.cover_tag+'.jpg'
br = BasicNewsRecipe.get_browser()
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:

Some files were not shown because too many files have changed in this diff Show More