├── .gitignore ├── LICENSE ├── Procfile ├── README.md ├── app.json ├── app.py ├── bedBathAndBeyond_scraper.py ├── config.py ├── db.py ├── flipkart_scraper.py ├── googlenews_scraper.py ├── homedepot_scraper.py ├── indeed_scraper.py ├── overstock_scraper.py ├── requirements.txt ├── runtime.txt ├── samsclub_scraper.py ├── static ├── css │ └── sidebar.css ├── js.js ├── js │ └── toggle_sidebar.js └── style.css ├── templates ├── base.html ├── bed_bath_and_beyond.html ├── flipkart.html ├── google_news.html ├── home_depot.html ├── indeed.html ├── index.html ├── overstock.html ├── samsclub.html ├── yellow_pages.html └── yelp.html ├── utils.py ├── yellowPages_scraper.py └── yelp_scraper.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # Jupyter Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # SageMath parsed files 80 | *.sage.py 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | .spyproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | # mkdocs documentation 98 | /site 99 | 100 | # mypy 101 | .mypy_cache/ 102 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn -b 0.0.0.0:$PORT app:app 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Scrap All 2 | Scrape all is a project that indends to provide take away scripts for scrapping data from various sources. 3 | 4 | ### Following websites are scrapped 5 | * Google News 6 | * Home Depot 7 | * Indeed 8 | * Over Stock 9 | * Sams Club 10 | 11 | 12 | ### Motivation 13 | Hobby project to refine and showcase my python skills 14 | 15 | ### Todo 16 | Add more scripts for other websites like yelp, yellowpages 17 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Flask python Heroku Login App", 3 | "description": "Flask Heroku Login App", 4 | "keywords": [ 5 | "Flask", 6 | "python", 7 | "sample" 8 | ], 9 | "repository": "https://github.com/stoic1979/scrap_utils.git", 10 | "addons": [ 11 | "heroku-postgresql" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | import os 2 | from flask import Flask, render_template, request 3 | from db import Mdb 4 | 5 | app = Flask(__name__) 6 | mdb = Mdb() 7 | 8 | 9 | @app.route('/') 10 | def home(): 11 | temp_data = {'title': 'Scrap Utils'} 12 | return render_template('index.html', **temp_data) 13 | 14 | 15 | @app.route('/indeed_scraper') 16 | def indeed_scraper(): 17 | indeed = mdb.get_indeed_data() 18 | # print 'data---------', data 19 | temp_data = {'title': 'Scrap_utils', 'indeed': indeed} 20 | return render_template('indeed.html', **temp_data) 21 | 22 | 23 | @app.route('/overstock_scraper') 24 | def overstock_scraper(): 25 | overstock = mdb.get_overstock_data() 26 | temp_data = {'title': 'Scrap_utils', 'overstock': overstock} 27 | return render_template('overstock.html', **temp_data) 28 | 29 | 30 | @app.route('/bed_bath_and_beyond') 31 | def bed_bath_and_beyond(): 32 | bedbathandbeyond = mdb.get_bedbathandbeyond_data() 33 | temp_data = {'title': 'Scrap_utils', 'bedbathandbeyond': bedbathandbeyond} 34 | return render_template('bed_bath_and_beyond.html', **temp_data) 35 | 36 | 37 | @app.route('/google_news') 38 | def google_news(): 39 | google_news = mdb.get_google_news_data() 40 | temp_data = {'title': 'Scrap_utils', 'googleNews': google_news} 41 | return render_template('google_news.html', **temp_data) 42 | 43 | 44 | @app.route('/home_depot') 45 | def home_depot(): 46 | homedepot = mdb.get_homedepot_data() 47 | temp_data = {'title': 'Scrap_utils', 'homedepot': homedepot} 48 | return render_template('home_depot.html', **temp_data) 49 | 50 | 51 | @app.route('/samsclub') 52 | def samsclub(): 53 | samsclub = mdb.get_samsclub_data() 54 | temp_data = {'title': 'Scrap_utils', 'samsclub': samsclub} 55 | return render_template('samsclub.html', **temp_data) 56 | 57 | 58 | @app.route('/yelp_scraper') 59 | def yelp_scraper(): 60 | yelp = mdb.get_yelp_data() 61 | # print 'data---------', data 62 | temp_data = {'title': 'Scrap_utils', 'yelp': yelp} 63 | return render_template('yelp.html', **temp_data) 64 | 65 | 66 | @app.route('/yellow_pages_scraper') 67 | def yellow_pages_scraper(): 68 | yellowpages = mdb.get_yellowpages_data() 69 | # print 'data---------', yellowpages 70 | temp_data = {'title': 'Scrap_utils', 'yellowpages': yellowpages} 71 | return render_template('yellow_pages.html', **temp_data) 72 | 73 | 74 | @app.route('/flipkart_scraper') 75 | def flipkart_scraper(): 76 | flipkart = mdb.get_flipkart_data() 77 | print 'data---------', flipkart 78 | temp_data = {'title': 'Scrap_utils', 'flipkart': flipkart} 79 | return render_template('flipkart.html', **temp_data) 80 | 81 | 82 | if __name__ == '__main__': 83 | port = int(os.environ.get('PORT', 5000)) 84 | app.run(host='0.0.0.0', port=port, debug=True, threaded=True) 85 | -------------------------------------------------------------------------------- /bedBathAndBeyond_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping products from Bed Bath And Beyond 3 | # 4 | 5 | 6 | import requests 7 | import traceback 8 | from db import Mdb 9 | from bs4 import BeautifulSoup 10 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 11 | 12 | 13 | class BedBathAndBeyondScraper: 14 | 15 | def __init__(self, product_category, product_subcategory, 16 | product_title, product_code): 17 | self.mdb = Mdb() 18 | self.product_category = product_category 19 | self.product_subcategory = product_subcategory 20 | self.product_title = product_title 21 | self.product_code = product_code 22 | 23 | def run(self): 24 | try: 25 | 26 | url = 'https://www.bedbathandbeyond.com/store/category' \ 27 | '/%s/%s/%s/%s/' \ 28 | % (self.product_category, self.product_subcategory, 29 | self.product_title, self.product_code) 30 | 31 | print '[BedBathAndBeyondScraper] :: fetching data from url: ', url 32 | r = requests.get(url, headers=get_request_headers()) 33 | if not r.status_code == 200: 34 | print "[BedBathAndBeyondScraper] :: Failed to get " \ 35 | "content of url: %s" % url 36 | return 37 | html_doc = r.content 38 | 39 | soup = BeautifulSoup(html_doc, 'html.parser') 40 | 41 | for div in soup.find_all('div', class_='productCo' 42 | 'ntent ec_listing'): 43 | self.scrap_result_row(div) 44 | sleep_scrapper('BedBathAndBeyondScraper') 45 | except Exception as exp: 46 | print '[BedBathAndBeyondScraper] :: run() :: Got exception: %s'\ 47 | % exp 48 | print(traceback.format_exc()) 49 | 50 | def scrap_result_row(self, div): 51 | 52 | try: 53 | div = div.find('div', class_='prodInfo') 54 | sub_div = div.find('div', class_='prodName') 55 | a = sub_div.find('a') 56 | print '[BedBathAndBeyondScraper] :: title: ', a.text.strip() 57 | div = div.find('div', class_='prodPrice') 58 | sub_div = div.find('div', class_='priceOfProduct') 59 | sub = sub_div.find('div', class_='isPrice') 60 | print '[BedBathAndBeyondScraper] :: price: ', sub.text.strip() 61 | 62 | self.mdb.bedbathandbeyond_scraper_data(a.text.strip(), sub.text.strip()) 63 | 64 | fname = 'data_bed_bath_and_beyond.csv' 65 | msg = "%s, %s," % (a.text.strip(), sub.text.strip()) 66 | print "[BedBathAndBeyondScraper] :: scrap_result_row() :: " \ 67 | "msg:", msg 68 | scraper_csv_write(fname, msg) 69 | 70 | except Exception as exp: 71 | print '[BedBathAndBeyondScraper] :: scrap_result_row() :: ' \ 72 | 'Got exception : %s' % exp 73 | print(traceback.format_exc()) 74 | 75 | 76 | if __name__ == '__main__': 77 | 78 | bedBathAndBeyond = BedBathAndBeyondScraper('furniture', 79 | 'living-room-furniture', 80 | 'living-room-collections', 81 | '14307') 82 | bedBathAndBeyond.run() 83 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | DB_HOST = '127.0.0.1' 2 | 3 | DB_PORT = 27017 4 | 5 | AUTH_DB_NAME = 'admin' 6 | 7 | DB_NAME = 'scrap_utils' 8 | 9 | DB_USER = 'admin' 10 | 11 | DB_PASS = '123' 12 | -------------------------------------------------------------------------------- /db.py: -------------------------------------------------------------------------------- 1 | from pymongo import MongoClient 2 | from config import * 3 | from flask import jsonify 4 | import traceback 5 | import json 6 | import datetime 7 | # from utils import scraper_csv_file 8 | from bson import ObjectId 9 | 10 | 11 | ############################################# 12 | # # 13 | # # 14 | # DATABASE CLASS # 15 | # # 16 | # # 17 | ############################################# 18 | class Mdb: 19 | 20 | def __init__(self): 21 | # local db 22 | # conn_str = "mongodb://%s:%s@%s:%d/%s" \ 23 | # % (DB_USER, DB_PASS, DB_HOST, DB_PORT, AUTH_DB_NAME) 24 | conn_str = 'mongodb://scrapuser:scrappass@ds257495.mlab.com:57495/scrap_utils' 25 | client = MongoClient(conn_str) 26 | self.db = client['scrap_utils'] 27 | 28 | def indeed_scraper_data(self, title, location, sal, summary): 29 | try: 30 | rec= { 31 | 'title': title, 32 | 'location': location, 33 | 'sal': sal, 34 | 'summary': summary 35 | } 36 | self.db.indeed.insert(rec) 37 | except Exception as exp: 38 | print('[IndeedScraper] :: indeed_scraper_data() :: Got exception: %s' % exp) 39 | print(traceback.format_exc()) 40 | 41 | def get_indeed_data(self): 42 | result = self.db.indeed.find() 43 | ret = [] 44 | for data in result: 45 | ret.append(data) 46 | return ret 47 | 48 | def overstock_scraper_data(self, price, title, rating): 49 | try: 50 | rec = { 51 | 'price': price, 52 | 'title': title, 53 | 'rating': rating, 54 | } 55 | self.db.overstock.insert(rec) 56 | except Exception as exp: 57 | print('[OverStockScraper] :: overstock_scraper_data() :: Got exception: %s' % exp) 58 | print(traceback.format_exc()) 59 | 60 | def get_overstock_data(self): 61 | result = self.db.overstock.find() 62 | ret = [] 63 | for data in result: 64 | ret.append(data) 65 | return ret 66 | 67 | def bedbathandbeyond_scraper_data(self, title, price): 68 | try: 69 | rec= { 70 | 'title': title, 71 | 'price': price 72 | } 73 | self.db.bedbathandbeyond.insert(rec) 74 | except Exception as exp: 75 | print('[BedBathAndBeyond] :: bedbathandbeyond_scraper_data() :: Got exception: %s' % exp) 76 | print(traceback.format_exc()) 77 | 78 | def get_bedbathandbeyond_data(self): 79 | result = self.db.bedbathandbeyond.find() 80 | ret = [] 81 | for data in result: 82 | ret.append(data) 83 | return ret 84 | 85 | def google_news_data(self, headlines, subheadline): 86 | try: 87 | rec = { 88 | 'headlines': headlines, 89 | 'subheadline': subheadline 90 | } 91 | self.db.googlenews.insert(rec) 92 | except Exception as exp: 93 | print('[GoogleNewsScraper] :: google_news_data() :: Got exception: %s' % exp) 94 | print(traceback.format_exc()) 95 | 96 | def get_google_news_data(self): 97 | result = self.db.googlenews.find() 98 | ret = [] 99 | for data in result: 100 | ret.append(data) 101 | return ret 102 | 103 | def homedepot_data(self, model, price, stock): 104 | try: 105 | rec = { 106 | 'model': model, 107 | 'price': price, 108 | 'stock': stock 109 | } 110 | self.db.homedepot.insert(rec) 111 | except Exception as exp: 112 | print('[HomeDepotScraper] :: homedepot_data() :: Got exception: %s' % exp) 113 | print(traceback.format_exc()) 114 | 115 | def get_homedepot_data(self): 116 | result = self.db.homedepot.find() 117 | ret = [] 118 | for data in result: 119 | ret.append(data) 120 | return ret 121 | 122 | def samsclub_data(self, name, rating, price, save_price): 123 | try: 124 | rec = { 125 | 'name': name, 126 | 'rating': rating, 127 | 'price': price, 128 | 'save_price': save_price 129 | } 130 | self.db.samsclub.insert(rec) 131 | except Exception as exp: 132 | print('[SamsClubScraper] :: samsclub_data() :: Got exception: %s' % exp) 133 | print(traceback.format_exc()) 134 | 135 | def get_samsclub_data(self): 136 | result = self.db.samsclub.find() 137 | ret = [] 138 | for data in result: 139 | ret.append(data) 140 | return ret 141 | 142 | def yelp_scraper_data(self, title, reviews_count, services, address, phone, snippet): 143 | try: 144 | rec = { 145 | 'title': title, 146 | 'reviews_count': reviews_count, 147 | 'services': services, 148 | 'address': address, 149 | 'phone': phone, 150 | 'snippet': snippet 151 | } 152 | self.db.yelp.insert(rec) 153 | except Exception as exp: 154 | print '[YelpScraper] :: yelp_scraper_data() :: Got exception: %s' % exp 155 | print(traceback.format_exc()) 156 | 157 | def get_yelp_data(self): 158 | result = self.db.yelp.find() 159 | ret = [] 160 | for data in result: 161 | ret.append(data) 162 | return ret 163 | 164 | def yellowpages_scraper_data(self, title, rating_count, address, phone, categories): 165 | try: 166 | rec = { 167 | 'title': title, 168 | 'rating_count': rating_count, 169 | 'address': address, 170 | 'phone': phone, 171 | 'categories': categories 172 | } 173 | self.db.yellowpages.insert(rec) 174 | except Exception as exp: 175 | print '[YellowPagesScraper] :: yellowpages_scraper_data() :: Got exception: %s' % exp 176 | print(traceback.format_exc()) 177 | 178 | def get_yellowpages_data(self): 179 | result = self.db.yellowpages.find() 180 | ret = [] 181 | for data in result: 182 | ret.append(data) 183 | return ret 184 | 185 | def flipkart_scraper_data(self, title, sub_rating, specifications, price): 186 | try: 187 | rec = { 188 | 'title': title, 189 | 'rating': sub_rating, 190 | 'specifications': specifications, 191 | 'price': price 192 | } 193 | self.db.flipkart.insert(rec) 194 | except Exception as exp: 195 | print '[YellowPagesScraper] :: yellowpages_scraper_data() :: Got exception: %s' % exp 196 | print(traceback.format_exc()) 197 | 198 | def get_flipkart_data(self): 199 | result = self.db.flipkart.find() 200 | ret = [] 201 | for data in result: 202 | ret.append(data) 203 | return ret 204 | 205 | if __name__ == '__main__': 206 | mdb = Mdb() 207 | # mdb.get_yellowpages_data() 208 | -------------------------------------------------------------------------------- /flipkart_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping products from flipkart 3 | # 4 | 5 | 6 | import requests 7 | import traceback 8 | from bs4 import BeautifulSoup 9 | from db import Mdb 10 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 11 | 12 | 13 | class FlipkartScraper: 14 | 15 | def __init__(self, product): 16 | self.product = product 17 | self.mdb = Mdb() 18 | 19 | def run(self): 20 | 21 | try: 22 | base_url = 'https://www.flipkart.com/search?as=off&as-show=' \ 23 | 'on&otracker=start&page=' 24 | sufix = '&q=%s&viewType=list' % self.product 25 | 26 | for i in range(1, 100, 1): 27 | url = base_url + str(i) + sufix 28 | print '[FlipkartScraper] :: fetching data from url: ', url 29 | 30 | r = requests.get(url, headers=get_request_headers()) 31 | if not r.status_code == 200: 32 | print '[FlipkartScraper] :: Failed to get the content ' \ 33 | 'of url: %s' % url 34 | return 35 | html_doc = r.content 36 | 37 | soup = BeautifulSoup(html_doc, 'html.parser') 38 | # for div in soup.find_all('div', class_='col col-7-12'): 39 | for div in soup.find_all('div', class_='_1-2Iqu row'): 40 | # print '---------------------div', div 41 | self.scrap_result_row(div) 42 | sleep_scrapper('FlipkartScraper') 43 | except Exception as exp: 44 | print '[FlipkartScraper] :: run() :: Got exception: %s' % exp 45 | print(traceback.format_exc()) 46 | 47 | def scrap_result_row(self, div): 48 | 49 | try: 50 | Product_div = div.find('div', class_='col col-7-12') 51 | title = Product_div.find('div', class_='_3wU53n').text.strip() 52 | print '[FlipkartScraper] :: title . . . . ..:', title 53 | # title_description = div.find('div', class_='OiPjke').text.strip() 54 | # print'[FlipkartScraper] :: title_description: ', title_description 55 | 56 | rating = div.find('div', class_='niH0FQ') 57 | sub_rating = rating.find('span', class_='_38sUEc').text.strip() 58 | print '[FlipkartScraper] :: rating . . . . .:', sub_rating 59 | 60 | specifications_div = div.find('div', class_='_3ULzGw') 61 | specifications = specifications_div.find('ul', class_='vFw0gD').text.strip() 62 | print '[FlipkartScraper] :: specifications .: ', specifications 63 | 64 | product_price = div.find('div', class_='_6BWGkk') 65 | div_price = product_price.find('div', class_='_1uv9Cb') 66 | price = div_price.find('div', class_='_1vC4OE _2rQ-NK').text.strip() 67 | print '[FlipkartScraper] :: price . . . . . :', price 68 | 69 | self.mdb.flipkart_scraper_data(title, sub_rating, specifications, price) 70 | 71 | fname = 'data_flipkart.csv' 72 | msg = "%s, %s, %s, %s," % (title, sub_rating, specifications, price) 73 | print "[FlipkartScraper] :: scrap_result_row() :: msg:", msg 74 | scraper_csv_write(fname, msg) 75 | 76 | except Exception as exp: 77 | print '[FlipkartScraper] :: scrap_result_row() :: ' \ 78 | 'Got exception: %s' % exp 79 | print(traceback.format_exc()) 80 | 81 | if __name__ == '__main__': 82 | flipkart = FlipkartScraper('iphones') 83 | flipkart.run() 84 | 85 | -------------------------------------------------------------------------------- /googlenews_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping products from Google News 3 | # 4 | 5 | 6 | import requests 7 | import traceback 8 | from db import Mdb 9 | from bs4 import BeautifulSoup 10 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 11 | 12 | 13 | class GoogleNewsScraper: 14 | 15 | def __init__(self): 16 | self.mdb = Mdb() 17 | 18 | def run(self): 19 | try: 20 | 21 | url = 'https://news.google.com/news/headlines/section/topic' \ 22 | '/NATION.en_in/India?ned=in&hl=en-IN&gl=IN' 23 | 24 | print '[GoogleNewsScraper] :: fetching data from url: ', url 25 | r = requests.get(url, headers=get_request_headers()) 26 | if not r.status_code == 200: 27 | print "[GoogleNewsScraper] :: Failed to get " \ 28 | "content of url: %s" % url 29 | return 30 | html_doc = r.content 31 | 32 | soup = BeautifulSoup(html_doc, 'html.parser') 33 | # print '------soup', soup 34 | for div in soup.find_all('div', class_='v4IxVd'): 35 | # print '-----div', div 36 | self.scrap_result_row(div) 37 | sleep_scrapper('GoogleNewsScraper') 38 | except Exception as exp: 39 | print '[GoogleNewsScraper] :: run() :: Got exception: %s'\ 40 | % exp 41 | print(traceback.format_exc()) 42 | 43 | def scrap_result_row(self, div): 44 | 45 | try: 46 | c_wiz = div.find('c-wiz', class_='M1Uqc kWyHVd') 47 | headlines = c_wiz.find('a', class_='nuEeue hzdq5d ME7ew')\ 48 | .text.strip() 49 | print '[GoogleNewsScraper] :: HeadLines: ', headlines 50 | div = div.find('div', class_='alVsqf') 51 | sub = div.find('div', class_='jJzAOb') 52 | c_wiz = sub.find('c-wiz', class_='M1Uqc MLSuAf') 53 | a = c_wiz.find('a', class_='nuEeue hzdq5d ME7ew').text.strip() 54 | print '[GoogleNewsScraper] :: SubheadLines: ', a 55 | 56 | # save in data base 57 | self.mdb.google_news_data(headlines, a) 58 | 59 | fname = 'data_google_news.csv' 60 | msg = "%s, %s" % (headlines, a) 61 | print "[GoogleNewsScraper] :: scrap_result_row() :: msg:", msg 62 | scraper_csv_write(fname, msg) 63 | 64 | except Exception as exp: 65 | print '[GoogleNewsScraper] :: scrap_result_row() :: ' \ 66 | 'Got exception : %s' % exp 67 | print(traceback.format_exc()) 68 | 69 | 70 | if __name__ == '__main__': 71 | 72 | googlenews = GoogleNewsScraper() 73 | googlenews.run() 74 | -------------------------------------------------------------------------------- /homedepot_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping products from HomeDepot 3 | # 4 | 5 | 6 | import requests 7 | from bs4 import BeautifulSoup 8 | from db import Mdb 9 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 10 | 11 | 12 | class HomeDepotScraper: 13 | 14 | def __init__(self, product): 15 | self.mdb = Mdb() 16 | self.product = product.replace(" ", "-") 17 | 18 | def run(self): 19 | 20 | base_url = 'https://www.homedepot.com/b/' \ 21 | '%s/N-5yc1vZbm79?Nao=' % (self.product) 22 | sufix = '&Ns=None' 23 | 24 | for j in range(0, 1000, 12): 25 | url = '' 26 | try: 27 | url = base_url + str(j) + sufix 28 | print '[HomeDepotScraper] :: fetching data from url: ', url 29 | r = requests.get(url, headers=get_request_headers()) 30 | if not r.status_code == 200: 31 | print "[HomeDepotScraper] :: Failed to get " \ 32 | "content of url: %s" % url 33 | return 34 | html_doc = r.content 35 | 36 | soup = BeautifulSoup(html_doc, 'html.parser') 37 | 38 | for div in soup.find_all('div', class_='pod-inner'): 39 | self.scrap_result_row(div) 40 | sleep_scrapper('HomeDepotScraper') 41 | except Exception as exp: 42 | print '[HomeDepotScraper] :: run() :: Got exception : ' \ 43 | '%s and fetching data from url: %s' % (exp, url) 44 | 45 | def scrap_result_row(self, div): 46 | 47 | try: 48 | # # name 49 | # name = div.find('div', class_='pod-plp__description js- 50 | # podclick-analytics') 51 | # a = name.find('a').strip() 52 | # print '[HomeDepotScraper] :: name: ', a 53 | 54 | # model 55 | model = div.find('div', class_='pod-plp__model').text.strip() 56 | print '[HomeDepotScraper] :: model: ', model 57 | 58 | # price 59 | price = div.find('div', class_='price').text.strip() 60 | print '[HomeDepotScraper] :: price: ', price 61 | 62 | # stock 63 | stock = div.find('div', class_='pod-plp__shipping-message__' 64 | 'wrapper-boss-bopis').text.strip() 65 | print '[HomeDepotScraper] :: stock: ', stock 66 | 67 | self.mdb.homedepot_data(model, price, stock) 68 | 69 | fname = 'data_home_depot.csv' 70 | msg = "%s, %s, %s," % (model, price, stock) 71 | print "[HomeDepotScraper] :: scrap_result_row() :: msg:", msg 72 | scraper_csv_write(fname, msg) 73 | 74 | except Exception as exp: 75 | print '[HomeDepotScraper] :: scrap_result_row() :: ' \ 76 | 'Got exception : %s' % exp 77 | 78 | if __name__ == '__main__': 79 | homedepot = HomeDepotScraper('Holiday Decorations Fall ' 80 | 'Decorations Fall Garland Wreaths') 81 | homedepot.run() 82 | -------------------------------------------------------------------------------- /indeed_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping jobs details from Indeed 3 | # 4 | 5 | 6 | import requests 7 | from db import Mdb 8 | from bs4 import BeautifulSoup 9 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 10 | 11 | 12 | 13 | class IndeedScrapper: 14 | 15 | def __init__(self, domain, pos, location): 16 | 17 | self.domain = domain.replace(" ", "+") 18 | self.post = pos.replace(" ", "+") 19 | self.location = location.replace(" ", "+") 20 | self.mdb = Mdb() 21 | 22 | def run(self): 23 | 24 | base_url = 'https://www.indeed.co%s/jobs?q=%s&l=%s&start=' % (self.domain, self.post, self.location) 25 | for j in range(0, 1000, 10): 26 | url = '' 27 | try: 28 | url = base_url + str(j) 29 | print '[IndeedScrapper] :: fetching data from url:', url 30 | r = requests.get(url, headers=get_request_headers()) 31 | 32 | if not r.status_code == 200: 33 | print "[IndeedScrapper] :: Failed to " \ 34 | "get content of url: %s" % url 35 | return 36 | 37 | html_doc = r.content 38 | 39 | soup = BeautifulSoup(html_doc, 'html.parser') 40 | # print '----------soup', soup 41 | for div in soup.find_all('div'): 42 | # ignore divs with classes 43 | if not div.attrs.has_key('class'): 44 | continue 45 | 46 | cls = div.attrs['class'] 47 | if 'row' in cls and 'result' in cls: 48 | self.scrap_result_row(div) 49 | sleep_scrapper('IndeedScraper') 50 | except Exception as exp: 51 | print '[IndeedScraper] :: run() :: Got exception : ' \ 52 | '%s and fetching data from url: %s' % (exp, url) 53 | 54 | def scrap_result_row(self, div): 55 | 56 | try: 57 | # title 58 | title = div.find('span', class_='company').text.strip() 59 | print "[IndeedScrapper] :: title: %s" % title 60 | 61 | # location 62 | span = div.find('span', class_='location') 63 | location = span.text.strip() 64 | print "[IndeedScrapper] :: location: %s" % location 65 | 66 | # salary 67 | sal = '' 68 | span = div.find('span', class_='no-wrap') 69 | if span: 70 | sal = span.text.strip() 71 | print "[IndeedScrapper] :: salary: %s" % sal 72 | 73 | # summary 74 | span = div.find('span', class_='summary') 75 | summary = span.text.strip() 76 | print "[IndeedScrapper] :: summery: %s" % summary 77 | 78 | self.mdb.indeed_scraper_data(title, location, sal, summary) 79 | 80 | fname = 'data_indeed.csv' 81 | msg = "%s, %s, %s, %s," % (title, location, sal, summary) 82 | print "[IndeedScrapper] :: scrap_result_row() :: msg:", msg 83 | scraper_csv_write(fname, msg) 84 | 85 | except Exception as exp: 86 | print '[IndeedScrapper] :: scrap_result_row() :: ' \ 87 | 'Got exception : %s' % exp 88 | 89 | if __name__ == '__main__': 90 | # scraper = IndeedScrapper('m', 'python', 'United States') 91 | scraper = IndeedScrapper('.in', 'python', 'mohali punjab') 92 | scraper.run() 93 | -------------------------------------------------------------------------------- /overstock_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping products from Overstock 3 | # 4 | 5 | 6 | import requests 7 | import traceback 8 | from db import Mdb 9 | from bs4 import BeautifulSoup 10 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 11 | 12 | 13 | class OverStockScraper: 14 | 15 | def __init__(self, product_category, product_code): 16 | self.mdb = Mdb() 17 | self.product_category = product_category 18 | self.product_code = product_code 19 | 20 | def run(self): 21 | url = '' 22 | try: 23 | base_url = 'https://www.overstock.com/Home-Garden/%s/%s/' \ 24 | % (self.product_category, self.product_code) 25 | sufix = 'subcat.html?page=' 26 | for j in range(1, 100, 1): 27 | url = base_url + sufix + str(j) 28 | print '[OverStockScraper] :: fetching data from url:', url 29 | r = requests.get(url, headers=get_request_headers()) 30 | 31 | if not r.status_code == 200: 32 | print "[OverStockScraper] :: Failed to " \ 33 | "get content of url: %s" % url 34 | return 35 | 36 | html_doc = r.content 37 | 38 | soup = BeautifulSoup(html_doc, 'html.parser') 39 | 40 | for div in soup.find_all('div', class_='product-tile'): 41 | # print '---------div', div 42 | self.scrap_result_row(div) 43 | # break 44 | sleep_scrapper('OverStockScraper') 45 | except Exception as exp: 46 | print '[OverStockScraper] :: run() :: Got exception : ' \ 47 | '%s and fetching data from url: %s' % (exp, url) 48 | print(traceback.format_exc()) 49 | 50 | def scrap_result_row(self, div): 51 | try: 52 | div = div.find('div', class_='product-info') 53 | sub_div = div.find('div', class_='product-price-wrapper') 54 | price = sub_div.find('div', class_='product-price-container')\ 55 | .text.strip() 56 | print '[OverStockScraper] :: price: ', price 57 | title = div.find('div', class_='product-title').text.strip() 58 | print '[OverStockScraper] :: title: ', title 59 | rating = div.find('div', class_='product-footer') 60 | print '[OverStockScraper] :: rating: ', rating 61 | 62 | self.mdb.overstock_scraper_data(price, title, rating) 63 | 64 | fname = 'data_over_stock.csv' 65 | msg = "%s, %s, %s," % (price, title, rating) 66 | print "[OverStockScraper] :: scrap_result_row() :: msg:", msg 67 | scraper_csv_write(fname, msg) 68 | 69 | except Exception as exp: 70 | print '[OverStockScraper] :: scrap_result_row() :: ' \ 71 | 'Got exception: %s' % exp 72 | print(traceback.format_exc()) 73 | 74 | 75 | if __name__ == '__main__': 76 | overstock = OverStockScraper('Living-Room-Chairs', '2737') 77 | overstock.run() 78 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | BeautifulSoup==3.2.1 2 | beautifulsoup4==4.6.0 3 | bs4==0.0.1 4 | certifi==2017.7.27.1 5 | chardet==3.0.4 6 | click==6.7 7 | Flask==0.12.2 8 | gunicorn==19.7.1 9 | idna==2.6 10 | itsdangerous==0.24 11 | Jinja2==2.10 12 | MarkupSafe==1.0 13 | oauthlib==2.0.6 14 | pymongo==3.5.1 15 | requests==2.18.4 16 | requests-oauthlib==0.8.0 17 | six==1.11.0 18 | tweepy==3.3.0 19 | urllib3==1.22 20 | Werkzeug==0.12.2 21 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-2.7.13 2 | -------------------------------------------------------------------------------- /samsclub_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping products from Samsclub 3 | # 4 | 5 | 6 | import requests 7 | import traceback 8 | from db import Mdb 9 | from bs4 import BeautifulSoup 10 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 11 | 12 | 13 | class SamsclubScraper: 14 | 15 | def __init__(self): 16 | self.mdb = Mdb() 17 | 18 | def run(self): 19 | 20 | for j in range(0, 2, 1): 21 | try: 22 | # url = base_url + str(j) + sufix 23 | url = 'https://www.samsclub.com/sams/coffee-tea-cocoa' \ 24 | '/1493.cp?xid=cat_sub&navAction=jump' 25 | print '[SamsclubScraper] :: fetching data from url: ', url 26 | r = requests.get(url, headers=get_request_headers()) 27 | 28 | if not r.status_code == 200: 29 | print "[SamsclubScraper] :: Failed to get content " \ 30 | "of url: %s" % url 31 | return 32 | 33 | html_doc = r.content 34 | 35 | soup = BeautifulSoup(html_doc, 'html.parser') 36 | 37 | for div in soup.find_all('div', class_='products-card'): 38 | self.scrap_result_row(div) 39 | sleep_scrapper('SamsclubScraper') 40 | 41 | except Exception as exp: 42 | print '[SamsclubScraper] :: run() :: Got exception : %s' % exp 43 | print(traceback.format_exc()) 44 | 45 | def scrap_result_row(self, div): 46 | try: 47 | # name 48 | figure = div.find('figure', title='Full title') 49 | a = figure.find('a', class_='cardProdLink') 50 | name = a.find('figcaption', class_='img-text').text.strip() 51 | print '[SamsclubScraper] :: name: ', name 52 | 53 | # rating 54 | rat = div.find('div', class_='cust-rating-details') 55 | cust_rating = rat.find('div', class_='cust-rating') 56 | rating = cust_rating.find('span', class_='rating-mem')\ 57 | .text.strip() 58 | print '[SamsclubScraper] :: Rating: ', rating 59 | 60 | # price 61 | prods_details = div.find('div', class_='prods-details') 62 | price = prods_details.find('div', class_='sc-price-v2')\ 63 | .text.strip() 64 | print '[SamsclubScraper] :: price: ', price 65 | 66 | # save Price 67 | prods_details = div.find('div', class_='prods-details') 68 | save = '' 69 | save_off = prods_details.find('div', class_='save-off-price') 70 | if save_off: 71 | save_price = save_off.text.strip() 72 | print '[SamsclubScraper] :: save-price: ', save_price 73 | 74 | self.mdb.samsclub_data(name, rating, price, save_price) 75 | 76 | fname = 'data_samsclub.csv' 77 | msg = "%s, %s, %s, %s," % (name, rating, price, save_price) 78 | print "[SamsclubScraper] :: scrap_result_row() :: msg:", msg 79 | scraper_csv_write(fname, msg) 80 | 81 | except Exception as exp: 82 | print '[SamsclubScraper] :: scrap_result_row() :: ' \ 83 | 'Got exception: %s' % exp 84 | print(traceback.format_exc()) 85 | 86 | if __name__ == '__main__': 87 | samsclub = SamsclubScraper() 88 | samsclub.run() 89 | -------------------------------------------------------------------------------- /static/css/sidebar.css: -------------------------------------------------------------------------------- 1 | body { 2 | overflow-x: hidden; 3 | } 4 | 5 | /* Toggle Styles */ 6 | .link{ 7 | color: white; 8 | font-size: 20px; 9 | margin-left: 20px; 10 | margin-right: 20px; 11 | } 12 | .right{ 13 | float: right; 14 | } 15 | .search{ 16 | margin-left: 200px; 17 | margin-right:20px; 18 | } 19 | #wrapper { 20 | padding-left: 0; 21 | -webkit-transition: all 0.6s ease; 22 | -moz-transition: all 0.6s ease; 23 | -o-transition: all 0.6s ease; 24 | transition: all 0.6s ease; 25 | 26 | } 27 | 28 | #wrapper.toggled { 29 | padding-left: 200px; 30 | } 31 | 32 | #sidebar-wrapper { 33 | z-index: 1000; 34 | position: fixed; 35 | left: 250px; 36 | 37 | width: 0; 38 | height: 100%; 39 | margin-left: -250px; 40 | overflow-y: auto; 41 | background-color:#312A25 !Important; 42 | 43 | -webkit-transition: all 0.5s ease; 44 | -moz-transition: all 0.5s ease; 45 | -o-transition: all 0.5s ease; 46 | transition: all 0.5s ease; 47 | } 48 | 49 | #wrapper.toggled #sidebar-wrapper { 50 | width: 0; 51 | } 52 | 53 | #page-content-wrapper { 54 | width: 100%; 55 | position: absolute; 56 | padding: 10px; 57 | } 58 | 59 | #wrapper.toggled #page-content-wrapper { 60 | position: absolute; 61 | margin-left:-250px; 62 | } 63 | 64 | /* Sidebar Styles */ 65 | 66 | .sidebar-nav { 67 | position: absolute; 68 | top: 0; 69 | right:15px; 70 | width: 200px; 71 | margin: 0; 72 | padding: 0; 73 | list-style: none; 74 | } 75 | 76 | .sidebar-nav li { 77 | text-indent: 20px; 78 | line-height: 40px; 79 | } 80 | 81 | .sidebar-nav li a { 82 | display: block; 83 | text-decoration: none; 84 | color: #999999; 85 | } 86 | 87 | .sidebar-nav li a:hover { 88 | text-decoration: none; 89 | color: #fff; 90 | background: #312A25; 91 | } 92 | 93 | .sidebar-nav li a:active, 94 | .sidebar-nav li a:focus { 95 | text-decoration: none; 96 | } 97 | 98 | .sidebar-nav > .sidebar-brand { 99 | height: 65px; 100 | font-size: 18px; 101 | line-height: 60px; 102 | } 103 | 104 | .sidebar-nav > .sidebar-brand a { 105 | color: #999999; 106 | } 107 | 108 | .sidebar-nav > .sidebar-brand a:hover { 109 | color: #fff; 110 | background: none; 111 | } 112 | 113 | @media(min-width:768px) { 114 | #wrapper { 115 | padding-left: 220px; 116 | } 117 | 118 | #wrapper.toggled { 119 | padding-left: 0; 120 | } 121 | 122 | #sidebar-wrapper { 123 | width: 200px; 124 | } 125 | 126 | #wrapper.toggled #sidebar-wrapper { 127 | width: 40px; 128 | 129 | 130 | } 131 | 132 | #wrapper.toggled span { 133 | visibility:hidden; 134 | 135 | } 136 | #wrapper.toggled i { 137 | float:right; 138 | } 139 | 140 | #page-content-wrapper { 141 | padding: 20px; 142 | position: relative; 143 | } 144 | 145 | #wrapper.toggled #page-content-wrapper { 146 | position: relative; 147 | margin-right: 0; 148 | } 149 | } 150 | 151 | 152 | @media(max-width:414px) { 153 | 154 | #wrapper.toggled #page-content-wrapper { 155 | position: absolute; 156 | margin-right:60px; 157 | } 158 | 159 | #wrapper.toggled { 160 | padding-right: 60px; 161 | } 162 | 163 | #wrapper { 164 | padding-left: 20px; 165 | } 166 | 167 | #wrapper.toggled { 168 | padding-left: 0; 169 | } 170 | 171 | #sidebar-wrapper { 172 | width: 50px; 173 | } 174 | 175 | #wrapper.toggled #sidebar-wrapper { 176 | width: 140px; 177 | 178 | 179 | } 180 | 181 | #wrapper.toggled span { 182 | visibility:visible; 183 | position:relative; 184 | left:70px; 185 | bottom:13px; 186 | 187 | } 188 | 189 | #wrapper span { 190 | visibility:hidden; 191 | 192 | } 193 | #wrapper.toggled i { 194 | float:right; 195 | } 196 | 197 | #wrapper i { 198 | float:right; 199 | } 200 | 201 | #page-content-wrapper { 202 | padding: 5px; 203 | position: relative; 204 | } 205 | 206 | #wrapper.toggled #page-content-wrapper { 207 | position: relative; 208 | margin-right: 0; 209 | } 210 | 211 | 212 | 213 | 214 | } 215 | 216 | /*! 217 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 218 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 219 | */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.6.3');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} 220 | -------------------------------------------------------------------------------- /static/js.js: -------------------------------------------------------------------------------- 1 | 2 | /*Menu-toggle*/ 3 | $("#menu-toggle").click(function(e) { 4 | e.preventDefault(); 5 | $("#wrapper").toggleClass("active"); 6 | // alert(1); 7 | }); 8 | -------------------------------------------------------------------------------- /static/js/toggle_sidebar.js: -------------------------------------------------------------------------------- 1 | $("#menu-toggle").click(function(e) { 2 | e.preventDefault(); 3 | $(this).find('i').toggleClass('fa fa-angle-double-left').toggleClass('fa fa-angle-double-right'); 4 | $("#wrapper").toggleClass("toggled"); 5 | }); 6 | -------------------------------------------------------------------------------- /static/style.css: -------------------------------------------------------------------------------- 1 | #wrapper { 2 | padding-left: 250px; 3 | transition: all 0.4s ease 0s; 4 | } 5 | 6 | #sidebar-wrapper { 7 | margin-left: -250px; 8 | top: 51px; 9 | left: 250px; 10 | width: 250px; 11 | background: #000; 12 | position: fixed; 13 | height: 100%; 14 | overflow-y: auto; 15 | z-index: 1000; 16 | transition: all 0.4s ease 0s; 17 | } 18 | 19 | #wrapper.active { 20 | padding-left: 0; 21 | } 22 | 23 | #wrapper.active #sidebar-wrapper { 24 | left: 0; 25 | } 26 | 27 | #page-content-wrapper { 28 | width: 100%; 29 | padding-top: 70px; 30 | transition: all 0.4s ease 0s; 31 | } 32 | 33 | .sidebar-nav { 34 | position: absolute; 35 | top: 0; 36 | width: 250px; 37 | list-style: none; 38 | margin: 0; 39 | padding: 0; 40 | } 41 | 42 | .sidebar-nav li { 43 | line-height: 40px; 44 | text-indent: 20px; 45 | } 46 | 47 | .sidebar-nav li a { 48 | color: #999999; 49 | display: block; 50 | text-decoration: none; 51 | padding-left: 60px; 52 | } 53 | 54 | .sidebar-nav li a span:before { 55 | position: absolute; 56 | left: 0; 57 | color: #41484c; 58 | text-align: center; 59 | width: 20px; 60 | line-height: 18px; 61 | } 62 | 63 | .sidebar-nav li a:hover, 64 | .sidebar-nav li.active { 65 | color: #fff; 66 | background: rgba(255,255,255,0.2); 67 | text-decoration: none; 68 | } 69 | 70 | .sidebar-nav li a:active, 71 | .sidebar-nav li a:focus { 72 | text-decoration: none; 73 | } 74 | 75 | .sidebar-nav > .sidebar-brand { 76 | height: 65px; 77 | line-height: 60px; 78 | font-size: 18px; 79 | } 80 | 81 | .sidebar-nav > .sidebar-brand a { 82 | color: #999999; 83 | } 84 | 85 | .sidebar-nav > .sidebar-brand a:hover { 86 | color: #fff; 87 | background: none; 88 | } 89 | 90 | #menu-toggle { 91 | text-decoration: none; 92 | float: left; 93 | color: #fff; 94 | padding-right: 15px; 95 | } 96 | 97 | @media (max-width:767px) { 98 | 99 | #wrapper { 100 | padding-left: 0; 101 | } 102 | 103 | #sidebar-wrapper { 104 | left: 0; 105 | } 106 | 107 | #wrapper.active { 108 | position: relative; 109 | left: 250px; 110 | } 111 | 112 | #wrapper.active #sidebar-wrapper { 113 | left: 250px; 114 | width: 250px; 115 | transition: all 0.4s ease 0s; 116 | } 117 | 118 | #menu-toggle { 119 | display: inline-block; 120 | } 121 | 122 | } 123 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {% block head %}{% endblock %} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 48 | 49 | 99 | 100 | 101 | 102 | 103 |
104 |
105 |
106 | {% block content %}{% endblock %} 107 |
108 |
109 |
110 | 111 | 112 |
120 | 121 | 122 | -------------------------------------------------------------------------------- /templates/bed_bath_and_beyond.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Bed Bath And Beyond

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {% for bedbathandbeyond in bedbathandbeyond %} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% endfor %} 33 |
BedBathAndBeyond IdBedBathAndBeyond TitleBedBathAndBeyond Price
{{ bedbathandbeyond._id }}{{ bedbathandbeyond.title }}{{ bedbathandbeyond.price }}
34 | 35 | 36 |

37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /templates/flipkart.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 |

9 |

10 |

Flipkart

11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% for flipkart in flipkart %} 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {% endfor %} 34 |
Product IdProduct TitleProduct SpecificationsProduct Price
{{ flipkart._id }}{{ flipkart.title }}{{ flipkart.specifications }}{{ flipkart.price }}
35 |

36 | 37 | 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /templates/google_news.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Google News

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {% for googleNews in googleNews %} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% endfor %} 33 |
Google News IdHeadLinesSubHeadLines
{{ googleNews._id }}{{ googleNews.headlines }}{{ googleNews.subheadline }}
34 | 35 | 36 |

37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /templates/home_depot.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Home Depot

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% for homedepot in homedepot %} 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | {% endfor %} 35 |
HomeDepot idHomedepot modelHomeDepot priceHomeDepot Stock
{{ homedepot._id}}{{ homedepot.model}}{{ homedepot.price}}{{ homedepot.stock}}
36 | 37 | 38 |

39 | {% endblock %} 40 | -------------------------------------------------------------------------------- /templates/indeed.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Indeed Jobs

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {% for indeed in indeed %} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {% endfor %} 37 |
Indeed IdCompany TitleLocationSalarySummary
{{ indeed._id }}{{ indeed.title }}{{ indeed.location }}{{ indeed.sal }}{{ indeed.summary }}
38 | 39 | 40 |

41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Welcome to Scrap Utils

12 | 13 |

14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /templates/overstock.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Over Stock

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {% for overstock in overstock %} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {% endfor %} 34 |
overstock Idoverstock titleoverstock priceoverstock rating
{{ overstock._id }}{{ overstock.title }}{{ overstock.price }}{{ overstock.rating }}
35 | 36 | 37 |

38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /templates/samsclub.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Sams Club

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% for samsclub in samsclub %} 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {% endfor %} 37 |
SamsClub IdSamsClub NameSamsClub RatingSamsClub PriceSamsClub Discount
{{ samsclub._id}}{{ samsclub.name}}{{ samsclub.rating}}{{ samsclub.price}}{{ samsclub.save_price}}
38 | 39 | 40 |

41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /templates/yellow_pages.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Yellow Pages

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {% for yellowpages in yellowpages %} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | {% endfor %} 39 |
YellowPages IdYellowPages TitleYellowpages RatingYellowPages AddressYellowPages Phone
{{ yellowpages._id }}{{ yellowpages.title }}{{ yellowpages.rating_count }}{{ yellowpages.address }}{{ yellowpages.phone }}
40 | 41 | 42 |

43 | {% endblock %} 44 | -------------------------------------------------------------------------------- /templates/yelp.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %}SignUp Page{% endblock %} 3 | {% block head %} 4 | {{ super() }} 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 9 | 10 |

11 |

Yelp

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | {% for yelp in yelp %} 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | {% endfor %} 41 |
Yelp IdYelp TitleYelp ReviewsYelp ServicesYelp Address
{{ yelp._id }}{{ yelp.title }}{{ yelp.reviews_count }}{{ yelp.services }}{{ yelp.address }}
42 | 43 | 44 |

45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | import time 3 | 4 | 5 | SCRAPPER_SLEEP_MIN = 30 # in seconds 6 | SCRAPPER_SLEEP_MAX = 60 # in seconds 7 | 8 | 9 | def get_request_headers(): 10 | agents = ['Mozilla/5.0', 'Safari/533.1', 'Chrome/33.0.1750.117'] 11 | return {'User-Agents': agents[randint(0, len(agents)-1)]} 12 | 13 | 14 | def get_rand_in_range(min, max): 15 | return randint(min, max) 16 | 17 | 18 | def get_scrapper_sleep(): 19 | return get_rand_in_range(SCRAPPER_SLEEP_MIN, SCRAPPER_SLEEP_MAX) 20 | 21 | 22 | def sleep_scrapper(scrapper_name): 23 | val = get_scrapper_sleep() 24 | print "\n\n[%s] :: SLEEPING FOR %d seconds.....\n\n" % (scrapper_name, val) 25 | time.sleep(val) 26 | print "\n\n[%s] :: RESUMED \n\n" % scrapper_name 27 | 28 | 29 | def scraper_csv_write(fname, msg): 30 | msg = msg.encode("utf-8") 31 | 32 | """ 33 | with open(fname, "a") as csv_file: 34 | writer = csv.writer(csv_file)3 35 | writer.writerow(row) 36 | """ 37 | 38 | f = open(fname, "a") 39 | f.write("%s\n" % msg) 40 | f.close() 41 | -------------------------------------------------------------------------------- /yellowPages_scraper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Script for scrapping 3 | # 4 | 5 | 6 | import requests 7 | import traceback 8 | from db import Mdb 9 | from bs4 import BeautifulSoup 10 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 11 | 12 | 13 | class YellowPagesScraper: 14 | 15 | def __init__(self): 16 | self.mdb = Mdb() 17 | 18 | def run(self): 19 | base_url = 'https://www.yellowpages.com/search?search_terms=' \ 20 | 'Dry%20Cleaners%20%26%20Laundries&geo_location_' \ 21 | 'terms=New%20York%2C%20NY&page=' 22 | 23 | for j in range(0, 1000, 1): 24 | try: 25 | url = base_url + str(j) 26 | print '[YellowPagesScraper] :: fetching data from url: ', url 27 | 28 | r = requests.get(url, headers=get_request_headers()) 29 | if not r.status_code == 200: 30 | print '[YellowPagesScraper] :: Failed to get the content ' \ 31 | 'of url: %s' % url 32 | return 33 | html_doc = r.content 34 | 35 | soup = BeautifulSoup(html_doc, 'html.parser') 36 | for div in soup.find_all('div', class_='info'): 37 | self.scrap_result_row(div) 38 | sleep_scrapper('YellowPagesScraper') 39 | except Exception as exp: 40 | print '[YellowPagesScraper] :: run() :: Got exception: %s' % exp 41 | print(traceback.format_exc()) 42 | 43 | def scrap_result_row(self, div): 44 | 45 | try: 46 | h2 = div.find('h2', class_='n') 47 | 48 | title = div.find('a', class_='business-name').text.strip() 49 | 50 | print "[YellowPagesScraper] :: title: %s" % title 51 | 52 | 53 | rating_count = 0 54 | span = div.find('span', class_='count') 55 | 56 | if span: 57 | span = span.text.strip() 58 | rating_count = span 59 | 60 | print "[YellowPagesScraper] :: rating_count: %s" % rating_count 61 | 62 | p = div.find('p', class_='adr') 63 | address = p.text 64 | print "[YellowPagesScraper] :: address: %s" % address 65 | 66 | 67 | phone = '' 68 | li = div.find('li', class_='phone primary') 69 | if li: 70 | phone = li.text.strip() 71 | print "[YellowPagesScraper] :: phone: %s" % phone 72 | else: 73 | print "[YellowPagesScraper] :: phone: %s" % li 74 | 75 | 76 | categories = '' 77 | cat_div = div.find('div', class_='categories') 78 | if cat_div: 79 | categories = cat_div.text.strip() 80 | print "[YellowPagesScraper] :: categories: %s" % categories 81 | else: 82 | print "[YellowPagesScraper] :: categories: %s" % cat_div 83 | 84 | self.mdb.yellowpages_scraper_data(title, rating_count, address, phone, categories) 85 | 86 | fname = 'data_yellow_pages.csv' 87 | msg = "%s, %s, %s, %s, %s" % (title, rating_count, address, phone, categories) 88 | print "[YellowPagesScraper] :: scrap_result_row() :: msg:", msg 89 | scraper_csv_write(fname, msg) 90 | 91 | except Exception as exp: 92 | print '[YellowPagesScraper] :: scrap_result_row() :: ' \ 93 | 'Got exception: %s' % exp 94 | print(traceback.format_exc()) 95 | 96 | 97 | if __name__ == '__main__': 98 | yellowpages = YellowPagesScraper() 99 | yellowpages.run() 100 | 101 | -------------------------------------------------------------------------------- /yelp_scraper.py: -------------------------------------------------------------------------------- 1 | import traceback 2 | import requests 3 | from db import Mdb 4 | from bs4 import BeautifulSoup 5 | from utils import sleep_scrapper, get_request_headers, scraper_csv_write 6 | 7 | 8 | class YelpScraper: 9 | 10 | def __init__(self, product, location): 11 | self.product = product.replace(" ", "+") 12 | self.location = location.replace(" ", "+") 13 | self.mdb = Mdb() 14 | 15 | def run(self): 16 | 17 | base_url = "https://www.yelp.com/search?find_desc=%s&find_loc=%s,+NY&start=" % (self.product, self.location) 18 | 19 | for j in range(1, 1000, 10): 20 | try: 21 | url = base_url + str(j) 22 | print '[YelpScraper] :: fetching data from url: ', url 23 | r = requests.get(url, headers=get_request_headers()) 24 | 25 | if not r.status_code == 200: 26 | print '[YelpScraper] :: Failed to get content of url: %s' % url 27 | return 28 | 29 | html_doc = r.content 30 | soup = BeautifulSoup(html_doc, 'html.parser') 31 | 32 | for li in soup.find_all('li', class_='regular-search-result'): 33 | self.scrap_row_yelp(li) 34 | sleep_scrapper('YelpScraper') 35 | except Exception as exp: 36 | print '[YelpScraper] :: run() :: Got exceptiion : %s ' % exp 37 | print(traceback.format_exc()) 38 | 39 | def scrap_row_yelp(self, li): 40 | try: 41 | h3 = li.find('h3', class_='search-result-title') 42 | 43 | # Getting title 44 | title = '' 45 | spans = h3.find_all('span') 46 | i = 0 47 | for span in spans: 48 | i += 1 49 | if i == 2: 50 | title = span.text.strip() 51 | 52 | print "[YelpScraper] :: title: %s" % title 53 | 54 | # Getting reviews count 55 | reviews_count = 0 56 | span = li.find('span', class_='review-count rating-qualifier') 57 | text = span.text 58 | lst = text.split() 59 | reviews_count = int(lst[0]) 60 | 61 | print "[YelpScraper] :: reviews count: %d" % reviews_count 62 | 63 | # Getting services 64 | services = [] 65 | span = li.find('span', class_='category-str-list') 66 | text = span.text 67 | lst = text.split(',') 68 | services = [itm.strip() for itm in lst] 69 | 70 | print "[YelpScraper] :: services: %s" % services 71 | 72 | # Getting address 73 | address = li.find('address').text.strip() 74 | 75 | print "[YelpScraper] :: address: %s" % address 76 | 77 | # Getting phone 78 | phone = li.find('span', class_='biz-phone').text.strip() 79 | 80 | print "[YelpScraper] :: phone: %s" % phone 81 | 82 | # Getting snippet 83 | p = li.find('p', class_='snippet').text.strip() 84 | lst = p.split('read more') 85 | snippet = lst[0].strip() 86 | print "[YelpScraper] :: snippet: %s" % snippet 87 | 88 | self.mdb.yelp_scraper_data(title, reviews_count, services, address, phone, snippet) 89 | 90 | fname = 'data_yelp.csv' 91 | msg = "%s, %s, %s, %s, %s, %s" % (title, reviews_count, services, address, phone, snippet) 92 | print "[IndeedScrapper] :: scrap_result_row() :: CSV file Msg: ", msg 93 | scraper_csv_write(fname, msg) 94 | 95 | except Exception as exp: 96 | print '[YelpScraper] :: scrap_row_yelp() :: Got exception: %s' % exp 97 | print(traceback.format_exc()) 98 | 99 | if __name__ == '__main__': 100 | yelp = YelpScraper('Dry Cleaning', 'New York') 101 | yelp.run() 102 | --------------------------------------------------------------------------------